Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

R "programming"

Name: Anonymous 2013-02-02 9:12

Hey /prog/,

Has anyone here studied the R programming language, and if so could you help me with a trivial problem?

#################################################
twr2 <- function() {
#making the vector and storing in y
y <- c(1,3,45,6,7)

#pasting the vector into txt so we can write to file
txt = paste(y,sep="")

#txt is now ready to be written to file, so here we go:
fileConn= file("c:\\r\\writeTest.fis")
writeLines(txt, fileConn)
close(fileConn)
}
#################################################

The above code creates a vector, and then stores it in a file. The problem is the file contents are
on individual lines, how can I separate them with a comma, or just a spac etc. instead of a new line?

Any help would be much appreciated (I'm also aware of the general consesus on R, and I agree with it but I'm being forced to use it)

Name: Anonymous 2013-02-03 16:18

>>18
Welcome to /prog/!.
You need to take it easy; check yourself before you wreck yourself and you'll be just fine.

>>19
Did you ever kill that guy?
After writing it I discovered that it was physically impossible to shit fury.
As they became older, they grew up to be an expert shitposter. Shigata ka nai; we all have regrets I suppose.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List