Re: [R] do not execute newline command

2011-04-05 Thread Kenn Konstabel
On Tue, Apr 5, 2011 at 10:40 AM, Lorenzo Cattarino wrote: > 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,

[R] do not execute newline command

2011-04-05 Thread Lorenzo Cattarino
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" comman