Hi R-users,

To automate the creation of scripts, I converted the code (example below) into a character string and wrote the object to a file:

Repeat <- "
myvec <- c(1:12)
cat('vector= ', myvec, '\n')
"

write (Repeat, 'yourpath/test.R')

the problem is that one line of the code is a "cat" command. In the output file (i.e. test.R), the newline symbol gets executed and I don't want that.

Any idea on how to do that?
Thanks
Lorenzo


	[[alternative HTML version deleted]]

