[R] Beginner help about output in R

nicolapon niqo at msn.com
Thu Nov 8 22:14:51 CET 2012


Dear R experts,

I am a beginner with R and I have a question regarding the output of a
function.

Basically, I created 2 functions, value1 and value2, that calculate two
values, and I would like to print those two values to an output datafile. I
tryed the following function:

function (x) {write.table(data.frame(value1(x),value2(x)),file=output.txt)}

My problem is that I would like to calculate those values for different
values of x and to get one line in the output file per value.
When I use this function for the second time, it erases the value of the
first try, etc. How can I proceed so that I will add a new line to the
output at every step instead of deleting the previous line?

Thank you very much for your answers!

Nicolas




--
View this message in context: http://r.789695.n4.nabble.com/Beginner-help-about-output-in-R-tp4648969.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list