[R] How can I access information stored after I run a command in R?

Tiago V. Pereira tiago.pereira at mbe.bio.br
Mon Jan 23 18:32:33 CET 2012


Dear all,

Supposed I run the following command:

###############################
#install.packages("Rassoc", dependencies=TRUE)
library("Rassoc")
ca=c(139,249,112)

co=c(136,244,120)

a=rbind(ca,co)

MAX3(a,"asy",1)
##############################

I get:

	The MAX3 test using the asy method

data:  a
statistic = 0.5993, p-value = 0.7933


How can one save the result 0.7933 into a file?

say:

foo <- 0.7933

write.table(foo, file ="/home/foo.txt", sep = " ",
row.names=FALSE,col.names=TRUE, quote=FALSE, qmethod = "double")


However, instead of typing the value above, I would like to replace it by
the macro (scalar, local) that has the accurate p-value.

thanks in advance for your help.

Tiago



More information about the R-help mailing list