Displaying 1 result from an estimated 1 matches for "taskout".
Did you mean:
diskout
2010 Feb 11
2
Suprising behavior of paste or cat?
...AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base
Sample code:
h.long <- 150
task <- c(rep(1,h.long),rep(2,h.long))
ord <- sample(1:length(task))
task <- task[ord]
taskout <- paste(task,collapse=",")
write(file="please.txt",taskout)
lastcomma <- function(x) {return(paste(x,",",collapse="",sep=""))}
res <- lastcomma(taskout)
write(file="fail.txt",res)
cat(file="catfail.txt",res)
Any ideas...