f.cross.section {tdata} | R Documentation |
Create a Cross-Section Frequency
Description
This frequency is typically used for indexed data. It is represented by an integer that indicates the position of the observation.
Usage
f.cross.section(position)
Arguments
position |
An integer representing the position of the observation. |
Details
In order to use the as.frequency
function for this type of frequency,
you need the following information:
-
Character Format
"#"
(the number is theposition
) -
Class Id
"cs"
Value
An object of class ldtf
which is also a list with the following members:
class |
Determines the class of this frequency. |
position |
Determines the |
Examples
cs0 <- f.cross.section(10) # this initializes a cross-section frequency
cs0_value_str <- as.character(cs0) # this will be '10'.
cs0_class_str <- get.class.id(cs0) # this will be 'cs'.
cs_new <- as.frequency("20", "cs")
# this is a cross-section frequency. It points to position 20.
[Package tdata version 0.3.0 Index]