as.character.ldtv: Convert a Variable to Character String

View source: R/variable.R

as.character.ldtvR Documentation

Convert a Variable to Character String

Description

Use this function to convert a variable to a compact form.

Usage

## S3 method for class 'ldtv'
as.character(x, ...)

Arguments

x

An object of class ldtv.

...

Additional arguments.

Details

The returned character will have just one line, with items separated by tab or semi-colon.

Value

A character that represents the variable.

Examples

# define the variable:
data <- c(1,2,3,2,3,4,5)
start_f <- f.monthly(2022,12)
fields <- list(c("key1","value1"), c("key2", "value2"))
v1 = variable(data,start_f, "V1", fields)

#string representation:
v1_str <- as.character(v1)


tdata documentation built on Nov. 7, 2023, 5:07 p.m.