Below is the code in a .r file. I want to execute this from a Windows command prompt, but how?
library(coda)
a <- read.coda("CODAchain1.txt","CODAindex.txt")
out <- capture.output(summary(a))
cat(out,file="out.txt",sep="\n",append=FALSE)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can make a text file named
coda_scrp.rand then at the command prompt type:Jim Lemon is one of the R guru’s that contribute on r-help. He does a lot of graphics stuff with base graphics and is a major contributor to the plotrix package. He also has a website for “Kickstarting R” and you can get more details about running R scripts here:
Here’s a link to a well written set of instructions that show the differences in using R CMD BATCH and Rscript:
And here is an answer on SO showing how to use a .bat file: Start RScript without DOS box (on Windows)?