[R] save rds as text
alR
ac331 at le.ac.uk
Fri Jul 5 12:44:02 CEST 2013
I created a table like this:
Analysis of Variance Table
Response: dati
Df Sum Sq Mean Sq F value Pr(>F)
groups 2 114 57.00 76 4.134e-11 ***
Residuals 24 18 0.75
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
and saved it to a variable called k.
When I tried to save the variable to txt file using
dput(k, file = "..\\Readouts\\anova_spike_number.txt")
or
lapply(k, write, "..\\Readouts\\anova_spike_number.txt", append=TRUE)
it destroys the formatting.
Then I saved to rds using
saveRDS(k, "..\\Readouts\\anova_spike_number.rds")
and the format was preserved.
I would like to convert the rds to txt preserving the table format. Or save
it as excel file or pdf would also be fine.
(If there is a way to avoid passing through rds file better, but still OK
using rds).
Thank you very much.
Best regards,
Alberto
--
View this message in context: http://r.789695.n4.nabble.com/save-rds-as-text-tp4670925.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list