[R] Need help with dataset formation problem
ligges at statistik.uni-dortmund.de
Wed Sep 20 01:06:38 CEST 2006
Tong Wang wrote:
> Hi, I have a data set , say, X :   mean 0 .8
> sd 1 3
> I need to use it in do.call() , so when I refer to the first col of
> X, I need it to be a list with members mean, sd. thus I constructed X
> as a list of list : X[]<- list(mean=0, sd=1), X[]<-.....
> . But this dataset is useless in other cases, for example, I can't
> pull out all the means as a vector. Can I get some suggestions on
sapply(X, "[[", 1)
> what's the best way to handle it? (except preparing two copies of
> this data with different formats)
> Thanks a lot in advance.
> R-help at stat.math.ethz.ch 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