Displaying 1 result from an estimated 1 matches for "r_tmp".
Did you mean:
__tmp
2010 Oct 11
1
running R script on linux server
...file, which is located on my home directory on
the cluster, and which contains the R script (enclosed in " ") to run
#!/bin/bash
echo " mat <- matrix(1:12,nrow=3,ncol=4)
diagonal <- diag(mat)
write.csv(diagonal, file = "diagonal.csv")
" > R_tmp
echo 'source("R_tmp")' | R --vanilla --slave
rm R_tmp
However the cluster sends back to me an error message saying:
Error in write.table(diagonal, file = diagonal.csv, col.names = NA, sep
= ",", :
object 'diagonal.csv' not found
Calls: source...