Windows under the R language running on the terminal

Source: Internet
Author: User

There are a number of ways in which you can run the R,r introduction in these sections to give some detailed guidance.

Normally, when the environment variable is similar to r\r-3.1.2\bin\x64 in the installation directory that contains R, you can run the R program under CMD.

Note I here is the 64bit environment, R.exe also exist under the R\r-3.1.2\bin, but the inclusion of this directory will cause the call R.exe failure, want to determine exactly which one, just double-click the executable program, if you can run the R language rpel that is that:

The r\r-3.1.2\bin\x64 directory contains many executable programs

R and Rterm Open are rterm, that is, a Rpel, in the R language Rpel the way to run R script is to use such as source (' Test. R '), the benefit is that the variables exist in the Rpel, which is why we use Rpel

Here are a few words to quote someone's blog:

> Source (' Test. R ')
To execute the script.
> Source (' Test. R ', echo=true) allows you to output more detailed information when the script executes.
 
 
The sink () function is useful when writing scripts to perform tasks automatically:
> Sink ("Record.lis")
All subsequent output results are redirected from the console to the external file Record.lis, and the results of the command output are not visible in the console. Use the command:
> Sink ()

Rscript and Rcmd can run R programs under CMD

The best way to learn about these commands is to--help, or Google

If you are accustomed to working under the shell and using shell programming, the second way is recommended, if you like R and Rpel, then the first way is great, use your favorite text editor, and then run the interactive program at the terminal.

Windows under the R language running on the terminal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.