[R] anova/factor

David Winsemius dwinsemius at comcast.net
Mon Dec 7 18:11:59 CET 2009


On Dec 7, 2009, at 11:38 AM, oscar linares wrote:

> Dear Wiza[R]ds,
>
> I have the following data in a data.frame. I need to do an anova with
> multiple comparison but I don't know how to factor the groups for  
> analysis.
> There are 3 groups, 1,2 and 3 labelled in column 1. Help appreciated  
> with
> thanks in advance.

Wouldn't it just be:

dfrm$Group <- factor(dfrm$Group)

?factor

-- 
David
>
>   Group       SI      Sif          SG           Io         I2       
> lol2
>      1 9.08e-05 9.08e+00 0.060842287  1.798556446  32.574500  34.37306
>      1 2.65e-05 2.65e+00 0.003231478  2.655825884  65.929661  68.58549
>      1 0.00e+00 0.00e+00 0.000000000  3.522121885  73.543024  77.06515
>      1 1.68e-05 1.68e+00 0.002958672  4.655116799  53.436267  58.09138
>      1 1.06e-06 1.06e-01 0.000483373  2.020228717   3.458982   5.47921
>      1 0.00e+00 0.00e+00 0.097785539  4.148313577  87.560551  91.70887
>      2 3.27e-05 3.27e+00 0.020160681  3.506062628  45.229857  48.73592
>      2 1.63e-05 1.63e+00 0.016336170  3.824083293  71.139331  74.96341
>     2 4.47e-05 4.47e+00 0.021202062  7.895615485  57.452354  65.34797
>     2 4.38e-05 4.38e+00 0.018721502  4.243604679 110.506859 114.75046
>     2 0.00e+00 0.00e+00 0.044930944 13.552492860  88.273415 101.82591
>     2 4.30e-05 4.30e+00 0.027125295  6.426449035  55.102468  61.52892
>     2 3.80e-05 3.80e+00 0.029939680  0.007273809  92.734675  92.74195
>     2 3.65e-06 3.65e-01 0.029382519  0.000221684 103.705858 103.70608
>     2 6.36e-06 6.36e-01 0.023179423  1.228886505 127.803373 129.03226
>     2 5.86e-13 5.86e-08 0.032732405  1.379044031 104.847896 106.22694
>     2 5.71e-06 5.71e-01 0.011643722  2.680653511  77.883436  80.56409
>     2 5.86e-13 5.86e-08 0.021973461  1.094195321  49.400687  50.49488
>     2 5.86e-13 5.86e-08 0.020197172  2.084520515  51.311323  53.39584
>     2 3.07e-06 3.07e-01 0.000000000  2.308138714 121.203022 123.51116
>     3 5.26e-05 5.26e+00 0.012185655  3.348526610  35.880625  39.22915
>     3 4.23e-05 4.23e+00 0.028480923  1.709440176  54.767838  56.47728
>     3 5.56e-05 5.56e+00 0.000000000  1.429574183  41.604787  43.03436
>     3 9.12e-06 9.12e-01 0.035704097  0.124131665  45.062952  45.18708
>     3 2.99e-05 2.99e+00 0.010169719  1.261369666  51.920969  53.18234
>     3 4.32e-05 4.32e+00 0.000490530  0.000000000  16.030226  16.03023
>
>
> Oscar
> -- 
> Oscar
> Oscar A. Linares, MD
> Translational Medicine Unit
> LaPlaisance Bay, Bolles Harbor
> Monroe, Michigan 48161
>
> Department of Medicine,
> University of Toledo College of Medicine
> Toledo, OH 43606-3390
>
> Department of Internal Medicine,
> The Detroit Medical Center (DMC)
> Harper University Hospital
> Wayne State University School of Medicine
> Detroit, Michigan 48201
>
> 	[[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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list