This command

rows <- as.numeric(system(paste("wc -l < /path/myFile.txt",sep=""), TRUE))

works when used directly in R and when I put it inside a shell script
and submit it to the cluster.

This command

columns <- as.numeric(system(paste("head -1 < /path/myFile.txt | wc
-w",sep=""), TRUE))

works when used in R, however is not working when I submit it.

I am using these commands to count the number of rows and columns on a
large file.

Any suggestions?

Thanks,

Juliet

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to