[R] Need help with dataset formation problem

Tong Wang wangtong at usc.edu
Wed Sep 20 00:47:03 CEST 2006


Hi, 
    I have a data set , say, X  :      [1]    [2]
                                         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[[1]]<- list(mean=0, sd=1),   X[[2]]<-.....    .  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 what's the best way to handle it? (except preparing two copies of this data with different formats)

Thanks a lot in advance. 

best



More information about the R-help mailing list