Hi guys, I have a piece of R code. Example code:
>R >library(survival) >ReadTable <- read.table("TestFile",header=F) >CoxModel <-coxph(Surv(V1)~V2+V3+V4+V5,data=ReadTable) >summary(CoxModel) >plot(survfit(CoxModel)) I have to run this on 100 files, instead of 1 "TestFile", and get outputs of 100 plots and summaries, instead of one summary and plot. Would anyone know how to run this set of R commands in a shell script on unix, or through a python script? I've been trying to understand Rpy2, PypeR and pyRserve, but I was wondering if someone had come across this before, and could show me a simple example of running R commands (such as those above) through unix or python. Many thanks Aoife -- View this message in context: http://r.789695.n4.nabble.com/Running-the-cox-model-in-R-through-python-or-unix-tp4691077.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.