An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090226/4ccc69ad/attachment-0001.pl>
Something similar to data.frame, but allows variables with unique lengths?
3 messages · Jason Rupert, jim holtman, Domenico Vistocco
?list
On Thu, Feb 26, 2009 at 6:15 PM, Jason Rupert <jasonkrupert at yahoo.com> 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 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.
Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
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.