[R] Something similar to data.frame, but allows variables with unique lengths?

Domenico Vistocco vistocco at unicas.it
Fri Feb 27 01:07:02 CET 2009


Jason Rupert wrote:
> I have a tightly coupled collection of variables with different lengths and types (some characters and others numerics).  I looked at the documentation for data.frame, but indicates that it expects all variables to have the same length, i.e. number of elements.  
>   
I think you are looking for the list obiect (the data.frame is a 
particular list with the constrain that each element have to be of the 
same length).
See:
?list
chapter 6 of An Introduction to R

Ciao,
domenico
>  
> I was hoping the "See Also" documentation for data.frame would have helped, but it did not have any good leads.  
>
> Here is a list of data I would like to store together:
> (FileName (character string), 
>  HighValue (numeric),
>  LowValue (numeric), 
>  Units (character), 
>  OthersValues (array of numerics), 
>  Descriptor (character string))
>  
> By any chance is there a generic object type feature within R to store such data together in one variable?  
>  
> Thank you for any details and leads you can provide. 
>  
>  
>
>
>       
> 	[[alternative HTML version deleted]]
>
>   
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list