I've recently wanted to analyze some data sets of growth curves; so, I decided 
to try out the grofit package the dataset inputting gave me some issues.


I've been trying to replicate the example from the grofit package with


R


> foo <- ran.data(100, 25)

> time <- foo$time
> data <- foo$data


> write.csv(file="data.csv", foo)

> sink(file="sink.txt")

> foo

> sink()


also to see if there is another problem I'm missing i've used sink() to see the 
actual output of this data.


The sink call provides a dataframe object, however I'm trying to use my own 
data in this. Is there a way to create the dataframe object in excel (I've 
tried following the example from the write.csv() output).


I know there is a problem with the input method by following the .csv output 
and i could use follow the sink() output to create my data frame object; 
however, I'm not sure about how i would do this with a large dataset with lets 
say 1000 data points. Has anyone ran into this issue and is there a quick work 
around?



the sink() output


$data
          X1 X2         X3           X4           X5           X6           X7  
        X8          X9         X10         X11       X12       X13       X14    
   X15      X16      X17
1     Test I  A 0.06195419  0.314959772  0.398263408  0.091132317  1.012083039  
0.35122189  1.78719671  2.47453614  3.25305005 3.9829927 5.2863775 5.8576975 
7.2154323 8.501599 8.405278
2     Test I  B 0.09543701  0.441797809 -0.345308045  0.462532336  1.324153423  
1.20722268  1.71422886  2.40135394  2.79558398 3.8981917 5.3614344 5.8423570 
6.8511538 7.192188 8.344946
3     Test I  C 0.16386938 -0.178975999  0.464790443  0.325264753  0.033088580  
0.79395919  0.63525411  1.71685521  2.62738577 2.5209004 4.4535178 4.9102966 
6.8867905 6.996433 7.553863
4     Test I  D 0.14198175  0.100778235 -0.164231759 -0.322266709  0.571067561  
1.24234632  1.54056165  1.96933568  2.97097469 3.7711348 3.8414402 5.2768758 
5.6688960 7.041779 7.651093
5     Test I  E 0.25390711  0.039312093 -0.463351713  0.628339527  0.418403984  
0.56460811  1.26348242  1.56823878  1.93588943 3.3141874 3.0360158 3.7567956 
5.6896075 5.873556 6.524754
6     Test I  F 0.22319304 -0.076464713  0.074501305 -0.160924707  0.384392150  
0.76412340  1.36118116  1.50356468  2.53322106 3.4924520 4.5054475 4.6222326 
5.5347148 6.349000 7.482548
7     Test I  G 0.28095487 -0.728248588  0.479450323  0.542078371  0.757460716  
0.10292177  1.01113655  1.14448036  2.19976257 3.3030023 3.0848547 4.1877661 
5.2832997 5.485825 6.375234
8     Test I  A 0.32135093 -0.036980401 -0.068313544 -0.059620107  0.440995143  
0.48424749  0.65644521  1.38482000  2.05964880 2.2548116 2.6813025 3.5085200 
4.7988415 5.017753 5.405950
9     Test I  B 0.31930456  0.169104577  0.100637447  0.070003632  0.304209263  
1.72301034


...


$time
           [,1]     [,2]     [,3]     [,4]     [,5]     [,6]     [,7]     [,8]  
   [,9]    [,10]    [,11]    [,12]    [,13]    [,14]    [,15]    [,16]    [,17] 
   [,18]    [,19]    [,20]
  [1,] 1.105562 2.429351 3.303547 4.941900 5.370762 6.939251 7.546835 8.400435 
9.602104 10.85058 11.27732 12.12658 13.80886 14.03953 15.88684 16.63256 
17.85349 18.29452 19.94482 20.74473
  [2,] 1.842357 2.183849 3.528340 4.761010 5.610834 6.473241 7.771216 8.575116 
9.544966 10.79126 11.61007 12.91479 13.21070 14.27869 15.30520 16.32062 
17.71822 18.94936 19.58821 20.46276
  [3,] 1.787510 2.734994 3.063325 4.788528 5.676988 6.096337 7.373838 8.047332 
9.042756 10.35715 11.47604 12.84095 13.14183 14.77351 15.81132 16.63433 
17.37387 18.51372 19.83332 20.74899
  [4,] 1.074662 2.386418 3.734951 4.889867 5.994899 6.483399 7.603956 8.826142 
9.536391 10.01653 11.03079 12.60530 13.00965 14.70169 15.17157 16.75678 
17.85311 18.22975 19.28407 20.73184
  [5,] 1.748113 2.185892 3.236870 4.294671 5.093055 6.910312 7.881226 8.067719 
9.632505 10.26807 11.03523 12.75277 13.66110 14.30814 15.61313 16.62628 
17.98222 18.95378 19.46946 20.17275



the write.csv() output

        data.X1 data.X2 data.X3 data.X4 data.X5 data.X6 data.X7 data.X8 data.X9
1       Test I  A       0.061954188     0.314959772     0.398263408     
0.091132317     1.012083039     0.351221894     1.787196715
2       Test I  B       0.095437013     0.441797809     -0.345308045    
0.462532336     1.324153423     1.207222678     1.714228858
3       Test I  C       0.16386938      -0.178975999    0.464790443     
0.325264753     0.03308858      0.793959194     0.63525411
4       Test I  D       0.141981749     0.100778235     -0.164231759    
-0.322266709    0.571067561     1.242346317     1.540561647
5       Test I  E       0.253907113     0.039312093     -0.463351713    
0.628339527     0.418403984     0.564608113     1.263482418
6       Test I  F       0.223193041     -0.076464713    0.074501305     
-0.160924707    0.38439215      0.764123401     1.361181159
7       Test I  G       0.280954867     -0.728248588    0.479450323     
0.542078371     0.757460716     0.102921772     1.011136548
8       Test I  A       0.321350933     -0.036980401    -0.068313544    
-0.059620107    0.440995143     0.48424749      0.656445215
9       Test I  B       0.319304561     0.169104577     0.100637447     
0.070003632     0.304209263     1.723010338     0.471089175
10      Test I  C       0.340566295     0.093127169     0.033974387     
0.245478841     0.393911475     0.203389585     1.005453213
11      Test I  D       0.333709948     0.333333875     0.617596536     
-0.155448079    0.610516542     0.198084915     0.436375715
12      Test I  E       0.447724878     0.143374568     -0.109355736    
0.51752932      0.798150461     0.195199233     0.401329643
13      Test I  F       0.390981428     -0.142028672    0.139992973     
0.350846958     0.674888644     0.760292796     0.364816546
14      Test I  G       0.495102072     0.428716874     0.448110388     
0.301635201     0.440899901     1.023213179     0.801876373
15      Test I  A       0.531173467     -0.148918942    0.05126733      
-0.454508347    0.487135445     -0.073263324    0.012359952
16      Test I  B       0.565521033     0.136874075     0.067359297     
0.199090002     0.251350792     0.73318158      0.41629902
?
No luck in mimicking these examples for me.




        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to