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