[R] save structure to be accesible later

Alaios alaios at yahoo.com
Thu Feb 5 13:57:42 CET 2015


Dear all,I have a function that returns the following list. At the end I will call my function 1000 times and I want to keep for each of these 1000 "results" (the structure as given below)in an order to be accessible later (Load the 1000 results and access them within a for loop for example)
How should I approach the issue?I would like to thank you for your exampleRegardsAlex
P,S The result of my function



 str(fitcass1)
List of 10
 $ parameters  :'data.frame':   2 obs. of  3 variables:
  ..$ pi   : num [1:2] 0.833 0.167
  ..$ mu   : num [1:2] 8828 110000
  ..$ sigma: num [1:2] 18085 1543
 $ se          :'data.frame':   2 obs. of  3 variables:
  ..$ pi.se   : num [1:2] NA NA
  ..$ mu.se   : num [1:2] NA NA
  ..$ sigma.se: num [1:2] NA NA
 $ distribution: chr "gamma"
 $ constraint  :List of 8
  ..$ conpi   : chr "NONE"
  ..$ conmu   : chr "NONE"
  ..$ consigma: chr "NONE"
  ..$ fixpi   : NULL
  ..$ fixmu   : NULL
  ..$ fixsigma: NULL
  ..$ cov     : NULL
  ..$ size    : NULL
 $ chisq       : num 52.4
 $ df          : num 5
 $ P           : num 4.57e-10
 $ vmat        : num [1:5, 1:5] NA NA NA NA NA NA NA NA NA NA ...
 $ mixdata     :Classes ‘mixdata’ and 'data.frame':     11 obs. of  2 variables:
  ..$ X    : num [1:11] 1e+04 2e+04 3e+04 4e+04 5e+04 6e+04 7e+04 8e+04 9e+04 1e+05 ...
  ..$ count: int [1:11] 993 137 82 30 21 5 7 14 21 2 ...
 $ usecondit   : logi FALSE
 - attr(*, "class")= chr "mix"



	[[alternative HTML version deleted]]



More information about the R-help mailing list