[R] Acessing Test Outputs for Writing to a Table
armstrwa
William.Armstrong at noaa.gov
Mon Mar 28 21:10:53 CEST 2011
Hi all,
I am trying to write a script that will compute Kendall's tau for a 75 time
series (using the Kendall package) and will then write the tau and p values
from the Kendall test to a text file table that can be read into Excel.
I am having no problem calculating Kendall's tau and the associated p value
for each time series, but I am having trouble figuring out how aggregate the
results from all the the time series into one table. For one thing, the tau
and p outputs from the Kendall function don't seem to be variables that have
been created in the workspace (i.e. if i type 'tau' in the command line, i
get an error saying "Error: object 'tau' not found"). Is there a way I can
access these values to write them to a table? When I try to write the
output of the Kendall function to a table using 'write.table' I get this
error message:
Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors =
stringsAsFactors) :
cannot coerce class '"Kendall"' into a data.frame
Secondly, once I am able to access the tau and p values, what would be the
best to write into the loop function to add the tau and p values calculated
from each iteration of the loop to a table?
Thank you.
Billy
--
View this message in context: http://r.789695.n4.nabble.com/Acessing-Test-Outputs-for-Writing-to-a-Table-tp3412743p3412743.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list