xinwei at stat.psu.edu
2010-Feb-18 20:36 UTC
[R] how to execute R script piece by piece on SSH terminal
hi, I am new to Linux and R environment. I have a existing R script. I wonder how to open my R script on Linux platform and execute selected written R command? thanks Xin
Sarah Goslee
2010-Feb-18 21:00 UTC
[R] how to execute R script piece by piece on SSH terminal
At the very simplest level, you can open the R script in a text editor. Then start R at the command line in the terminal by typing R and then copy and paste the desired lines from the text file into the terminal. There are plenty of more elegant and complex solutions, but that one is easy and will work. Sarah On Thu, Feb 18, 2010 at 3:36 PM, <xinwei at stat.psu.edu> wrote:> hi, I am new to Linux and R environment. I have a existing R script. I > wonder how to open my R script on Linux platform and execute selected > written R command? > > thanks > > Xin >-- Sarah Goslee http://www.functionaldiversity.org
Vojtěch Zeisek
2010-Feb-18 21:03 UTC
[R] how to execute R script piece by piece on SSH terminal
Hello, if You run R in terminal, You can type R to start the R software, then use command source("/path/to/your/script") to load the script and then You call functions from the script as usual. Optionally, You can move to the directory with script with command setwd("/path/to/the/directory"). Or, I would recommend to install Rkward (http://rkward.sourceforge.net/), what is excellent graphical user interface for R. Best regards, Vojt?ch Zeisek Dne ?t 18. ?nora 2010 21:36:34 xinwei at stat.psu.edu napsal(a):> hi, I am new to Linux and R environment. I have a existing R script. I > wonder how to open my R script on Linux platform and execute selected > written R command? > > thanks > > Xin > > ______________________________________________ > R-help at 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.-- Vojt?ch Zeisek Komunita openSUSE GNU/Linuxu / Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://web.natur.cuni.cz/~zeisek/ ------------- dal?? ??st --------------- A non-text attachment was scrubbed... Name: [??dn? popis nen? k dispozici] Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100218/d44618e7/attachment.bin>