running R script

2011-06-23 21:55 · cliffgao

You can run R script in following ways: cliffgao (1) open R console and type: source("my.code.R“) (2) in command line or in bash:

You can run R script in following ways:

cliffgao

(1)  open R console and type:

source("my.code.R“)

(2) in command line  or in bash:

add

"#!/usr/bin/env Rscript"

in the first line of  "my.code.R"

$ Rscript  my.code.R

or

chmod +x my.code.R

./my.code.R

(3)   in BATCH mode

$ R CMD BATCH  my.code.R

(4) See more in

https://manuals.bioinformatics.ucr.edu/home/programming-in-r

关键词: