1. Read an Introduction to R (ships with R) or other R tutorial (there
are many good ones on the Web).
1.5 ... Also check CRAN for books and other info.
2. ?write.table
.... but you'll need what you learn in the tutorial to extract output
from your functions.
2.5 ...and of course, ?xtabs and ?fisher.test, paying attention to
the "Value" sections of the Help.
This list cannot replace your expending time and effort to learn R's
basics The tutorials and Help pages have the info you need..
-- Bert
On Mon, Aug 27, 2012 at 5:45 PM, moulirc <c.radhakrishnan at uq.edu.au>
wrote:> Hi,
>
> I am new to R and using Rcmdr and like to automate and get into
scripting...
>
> I am using for evaluating two variables
>
> .Table <- xtabs(~CurSWI+BckMo, data=swanalysis_run1)
> .Table
> fisher.test(.Table)
> remove(.Table)
>
> the output for this will be ....
>> .Table
> BckMo
> CurSWI N/A No Yes
> N/A 1 0 0
> No 3 62 38
> Yes 2 23 24
>
>> fisher.test(.Table)
>
> Fisher's Exact Test for Count Data
>
> data: .Table
> p-value = 0.02689
> alternative hypothesis: two.sided
> ***************
> What i would like to do is get an output in a excel or csv format with
>
> p.value and BckMo
>
>
> (BckMo, 0.02689)
>
> pls help me...thanks in advance..
> cheers
>
> Mouli
>
>
>
>
>
>
> --
> View this message in context:
http://r.789695.n4.nabble.com/New-to-R-tp4641489.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
--
Bert Gunter
Genentech Nonclinical Biostatistics
Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm