|
@@ -2,7 +2,8 @@
|
|
|
|
|
|
G. Grothendieck
|
|
G. Grothendieck
|
|
|
|
|
|
-Software and documentation is (c) 2013 GKX Associates Inc. and licensed under [GPL 2.0](http://www.gnu.org/licenses/gpl-2.0.html).
|
|
|
|
|
|
+Software and documentation is (c) 2013 GKX Associates Inc. and licensed
|
|
|
|
+under [GPL 2.0](http://www.gnu.org/licenses/gpl-2.0.html).
|
|
|
|
|
|
## Introduction ##
|
|
## Introduction ##
|
|
|
|
|
|
@@ -37,13 +38,13 @@ privileges).
|
|
`clip2r.js` copies the current clipboard into a running R instance. It can be
|
|
`clip2r.js` copies the current clipboard into a running R instance. It can be
|
|
used with `vim` or other text editor.
|
|
used with `vim` or other text editor.
|
|
|
|
|
|
-`find-miktex.hta` displays a popup window showing where it found MiKTeX.
|
|
|
|
|
|
+`find-miktex.hta` displays a popup window showing where it found MiKTeX.
|
|
|
|
|
|
## R.bat ##
|
|
## R.bat ##
|
|
|
|
|
|
### Purpose ###
|
|
### Purpose ###
|
|
|
|
|
|
-The purpose of `R.bat` is to facilitiate the use of R from the Windows `cmd`
|
|
|
|
|
|
+The purpose of `R.bat` is to facilitiate the use of R from the Windows `cmd`
|
|
line by eliminating the need to make any system changes. There is no need to
|
|
line by eliminating the need to make any system changes. There is no need to
|
|
modify the Windows path or to set any environment variables for standard
|
|
modify the Windows path or to set any environment variables for standard
|
|
configurations of R. It will automatically locate R (and Rtools and
|
|
configurations of R. It will automatically locate R (and Rtools and
|
|
@@ -58,7 +59,7 @@ is stored only in the local process.
|
|
such situations where there are minimal permissions.
|
|
such situations where there are minimal permissions.
|
|
|
|
|
|
Like all the other utilities here, `R.bat` is a self contained no-install script
|
|
Like all the other utilities here, `R.bat` is a self contained no-install script
|
|
-with no dependencies so just place it anywhere on your Windows path or in the
|
|
|
|
|
|
+with no dependencies so just place it anywhere on your Windows path or in the
|
|
current directory.
|
|
current directory.
|
|
|
|
|
|
### Typical Usage ###
|
|
### Typical Usage ###
|
|
@@ -67,23 +68,20 @@ Typical usage of `R.bat` to launch R gui is the following ^[
|
|
If `R.exe` were on the Windows path and before `R.bat` then it would
|
|
If `R.exe` were on the Windows path and before `R.bat` then it would
|
|
have to be written as follows: `R.bat gui`]:
|
|
have to be written as follows: `R.bat gui`]:
|
|
|
|
|
|
- R gui
|
|
|
|
-
|
|
|
|
|
|
+```
|
|
|
|
+R gui
|
|
|
|
+```
|
|
|
|
|
|
This runs `Rgui.exe`. If further arguments are specified they are passed on to
|
|
This runs `Rgui.exe`. If further arguments are specified they are passed on to
|
|
-`Rgui.exe`. For example,
|
|
|
|
-
|
|
|
|
- R gui --help
|
|
|
|
-
|
|
|
|
-will run:
|
|
|
|
|
|
+`Rgui.exe`. For example, `R gui --help`
|
|
|
|
|
|
- Rgui.exe --help
|
|
|
|
|
|
+will run: `Rgui.exe --help`
|
|
|
|
|
|
### Subcommands ###
|
|
### Subcommands ###
|
|
|
|
|
|
If the first argument is optionally one of `cd`, `cmd`, `dir`, `gui`, `help`,
|
|
If the first argument is optionally one of `cd`, `cmd`, `dir`, `gui`, `help`,
|
|
`path`, `R`, `script`, `show`, `SetReg`, `tools`, `touch` or the same except
|
|
`path`, `R`, `script`, `show`, `SetReg`, `tools`, `touch` or the same except
|
|
-for upper/lower case then that argument is referred to as the subcommand.
|
|
|
|
|
|
+for upper/lower case then that argument is referred to as the subcommand.
|
|
|
|
|
|
If no subcommand is provided then the default subcommand is derived from the
|
|
If no subcommand is provided then the default subcommand is derived from the
|
|
name of the script.
|
|
name of the script.
|
|
@@ -98,24 +96,28 @@ remainder becomes the default subcommand. For example, if `R.bat` were renamed
|
|
Other executable files that come with R (`R.exe`, `Rcmd.exe`, `Rscript.exe`)
|
|
Other executable files that come with R (`R.exe`, `Rcmd.exe`, `Rscript.exe`)
|
|
can be run in a similar way:
|
|
can be run in a similar way:
|
|
|
|
|
|
- R --help
|
|
|
|
- R cmd --help
|
|
|
|
- R script --help
|
|
|
|
|
|
+```
|
|
|
|
+R --help
|
|
|
|
+R cmd --help
|
|
|
|
+R script --help
|
|
|
|
+```
|
|
|
|
|
|
-(`RSetReg.exe` is another executable that comes with R for Windows. It will be
|
|
|
|
|
|
+(`RSetReg.exe` is another executable that comes with R for Windows. It will be
|
|
discussed later.)
|
|
discussed later.)
|
|
|
|
|
|
### Support Subcommands ###
|
|
### Support Subcommands ###
|
|
|
|
|
|
There are also some support commands:
|
|
There are also some support commands:
|
|
|
|
|
|
- R cd
|
|
|
|
- R dir
|
|
|
|
- R ls
|
|
|
|
- R help
|
|
|
|
- R show
|
|
|
|
|
|
+```
|
|
|
|
+R cd
|
|
|
|
+R dir
|
|
|
|
+R ls
|
|
|
|
+R help
|
|
|
|
+R show
|
|
|
|
+```
|
|
|
|
|
|
-`R cd` changes directory to the `R_ROOT` directory (typically
|
|
|
|
|
|
+`R cd` changes directory to the `R_ROOT` directory (typically
|
|
`C:\Program Files\R`).
|
|
`C:\Program Files\R`).
|
|
|
|
|
|
`R dir` displays the contents of that directory in chronological order - oldest
|
|
`R dir` displays the contents of that directory in chronological order - oldest
|
|
@@ -123,23 +125,25 @@ first and most recent last. `R ls` is the same as `R dir`.
|
|
|
|
|
|
`R show` shows the values of the `R_` environment variables used by `R.bat` .
|
|
`R show` shows the values of the `R_` environment variables used by `R.bat` .
|
|
Below is a list with typical values. These values are determined by the script
|
|
Below is a list with typical values. These values are determined by the script
|
|
-heuristically (or the user can set any before running `R.bat` or
|
|
|
|
|
|
+heuristically (or the user can set any before running `R.bat` or
|
|
`R.bat` itself can be customized by setting any of them near top of the script).
|
|
`R.bat` itself can be customized by setting any of them near top of the script).
|
|
|
|
|
|
- R_ARCH=x64
|
|
|
|
- R_CMD=RShow
|
|
|
|
- R_HOME=C:\Program Files\R\R-2.15.3
|
|
|
|
- R_MIKTEX_PATH=\Program Files (x86)\MiKTeX 2.9\miktex\bin
|
|
|
|
- R_PATH=C:\Program Files\R\R-2.15.3\bin\x64
|
|
|
|
- R_REGISTRY=1
|
|
|
|
- R_ROOT=C:\Program Files\R
|
|
|
|
- R_TOOLS=C:\Rtools
|
|
|
|
- R_TOOLS_PATH=C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;
|
|
|
|
- R_TOOLS_VERSION=3.0.0.1927
|
|
|
|
- R_VER=R-2.15.3
|
|
|
|
|
|
+```
|
|
|
|
+R_ARCH=x64
|
|
|
|
+R_CMD=RShow
|
|
|
|
+R_HOME=C:\Program Files\R\R-2.15.3
|
|
|
|
+R_MIKTEX_PATH=\Program Files (x86)\MiKTeX 2.9\miktex\bin
|
|
|
|
+R_PATH=C:\Program Files\R\R-2.15.3\bin\x64
|
|
|
|
+R_REGISTRY=1
|
|
|
|
+R_ROOT=C:\Program Files\R
|
|
|
|
+R_TOOLS=C:\Rtools
|
|
|
|
+R_TOOLS_PATH=C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;
|
|
|
|
+R_TOOLS_VERSION=3.0.0.1927
|
|
|
|
+R_VER=R-2.15.3
|
|
|
|
+```
|
|
|
|
|
|
`R_PATH`, `R_MIKTEX_PATH` and `R_TOOLS_PATH` are the paths to the directories
|
|
`R_PATH`, `R_MIKTEX_PATH` and `R_TOOLS_PATH` are the paths to the directories
|
|
-holding the `R`, `MiKTeX` and `Rtools` binaries (i.e. `.exe` files).
|
|
|
|
|
|
+holding the `R`, `MiKTeX` and `Rtools` binaries (i.e. `.exe` files).
|
|
|
|
|
|
`R_CMD` indicates the subcommand or if no subcommand specified then it is
|
|
`R_CMD` indicates the subcommand or if no subcommand specified then it is
|
|
derived from the name of the script. For example if the script were renamed
|
|
derived from the name of the script. For example if the script were renamed
|
|
@@ -155,42 +159,47 @@ values for these variables.
|
|
|
|
|
|
### Path Setting Subcommands ###
|
|
### Path Setting Subcommands ###
|
|
|
|
|
|
-The command
|
|
|
|
|
|
+The command
|
|
|
|
|
|
- R path
|
|
|
|
|
|
+```
|
|
|
|
+R path
|
|
|
|
+```
|
|
|
|
|
|
adds `R_PATH`, `R_MIKTEX_PATH` and `R_TOOLS` to the Windows path for the
|
|
adds `R_PATH`, `R_MIKTEX_PATH` and `R_TOOLS` to the Windows path for the
|
|
current `cmd` line session. No other `cmd` line sessions are affected and
|
|
current `cmd` line session. No other `cmd` line sessions are affected and
|
|
-there are no permanent changes to the system. Once this is run
|
|
|
|
|
|
+there are no permanent changes to the system. Once this is run
|
|
the R binaries will be on the path so they can be accessed directly without
|
|
the R binaries will be on the path so they can be accessed directly without
|
|
`R.bat` within the same Windows cmd line session.
|
|
`R.bat` within the same Windows cmd line session.
|
|
|
|
|
|
This mode of operation has the advantage that startup will be slightly faster
|
|
This mode of operation has the advantage that startup will be slightly faster
|
|
-since `R.bat` will not have to run each time that `R` is started. ^[On a
|
|
|
|
|
|
+since `R.bat` will not have to run each time that `R` is started. ^[On a
|
|
1.9 GHz Windows 8 machine `R.bat show` runs in 0.75 seconds.]
|
|
1.9 GHz Windows 8 machine `R.bat show` runs in 0.75 seconds.]
|
|
|
|
|
|
Note that if both `R.bat` and `R.exe` exist on the Windows path then the first
|
|
Note that if both `R.bat` and `R.exe` exist on the Windows path then the first
|
|
on the path will be called if one uses:
|
|
on the path will be called if one uses:
|
|
|
|
|
|
- R ...arguments...
|
|
|
|
|
|
+```
|
|
|
|
+R ...arguments...
|
|
|
|
+```
|
|
|
|
|
|
-thus one may wish to enter `R.bat` or `R.exe` rather than just `R` for clarity.
|
|
|
|
|
|
+thus one may wish to enter `R.bat` or `R.exe` rather than just `R` for clarity.
|
|
|
|
|
|
Alternately, rename `R.bat` to `Rpath.bat` in which case the command `R path`
|
|
Alternately, rename `R.bat` to `Rpath.bat` in which case the command `R path`
|
|
becomes just `Rpath` and `R` becomes unambiguous.
|
|
becomes just `Rpath` and `R` becomes unambiguous.
|
|
|
|
|
|
-(An alternative to `R path` is the `Rpathset.bat` utility which will be
|
|
|
|
|
|
+(An alternative to `R path` is the `Rpathset.bat` utility which will be
|
|
described later.)
|
|
described later.)
|
|
|
|
|
|
The command
|
|
The command
|
|
|
|
|
|
- R tools
|
|
|
|
|
|
+```
|
|
|
|
+R tools
|
|
|
|
+```
|
|
|
|
|
|
is similar to `R path` except only `R_TOOLS_PATH` and `R_MIKTEX_PATH` are
|
|
is similar to `R path` except only `R_TOOLS_PATH` and `R_MIKTEX_PATH` are
|
|
added to the path (but not `R_PATH`). This might be useful if you need to use
|
|
added to the path (but not `R_PATH`). This might be useful if you need to use
|
|
those utilities without R.
|
|
those utilities without R.
|
|
|
|
|
|
-
|
|
|
|
### Selecting R Version ###
|
|
### Selecting R Version ###
|
|
|
|
|
|
For R installations using the standard locations and not specifying any of the
|
|
For R installations using the standard locations and not specifying any of the
|
|
@@ -201,13 +210,17 @@ installation in `R_ROOT` which has the most recent date will be used.
|
|
|
|
|
|
If we enter this at the `cmd` line:
|
|
If we enter this at the `cmd` line:
|
|
|
|
|
|
- set R_VER=R-2.14.0
|
|
|
|
|
|
+```
|
|
|
|
+set R_VER=R-2.14.0
|
|
|
|
+```
|
|
|
|
|
|
then for the remainder of this `cmd` line session that version will be used.
|
|
then for the remainder of this `cmd` line session that version will be used.
|
|
If one wishes to use two different R versions at once we could spawn a new `cmd`
|
|
If one wishes to use two different R versions at once we could spawn a new `cmd`
|
|
line session:
|
|
line session:
|
|
|
|
|
|
- start
|
|
|
|
|
|
+```
|
|
|
|
+start
|
|
|
|
+```
|
|
|
|
|
|
and then enter the same set command into the new window. Now any use of R in
|
|
and then enter the same set command into the new window. Now any use of R in
|
|
the original window will use the default version whereas in the new `cmd` line
|
|
the original window will use the default version whereas in the new `cmd` line
|
|
@@ -216,9 +229,11 @@ window it will use the specified version.
|
|
One can change the registry entry permanently to refer to a particlar version
|
|
One can change the registry entry permanently to refer to a particlar version
|
|
like this:
|
|
like this:
|
|
|
|
|
|
- cmd /c set R_VER=R-2.14.0 ^& R SetReg
|
|
|
|
|
|
+```
|
|
|
|
+cmd /c set R_VER=R-2.14.0 ^& R SetReg
|
|
|
|
+```
|
|
|
|
|
|
-This requires Administrator privileges. If not already running as
|
|
|
|
|
|
+This requires Administrator privileges. If not already running as
|
|
Administrator a window will pop up requesting permission to proceed.
|
|
Administrator a window will pop up requesting permission to proceed.
|
|
|
|
|
|
If the registry is empty or `R_REGISTRY=0` then the default version is not
|
|
If the registry is empty or `R_REGISTRY=0` then the default version is not
|
|
@@ -227,12 +242,14 @@ determined by which R install directory is the most recent. To make a
|
|
particular R install directory the most recent run the following in a `cmd`
|
|
particular R install directory the most recent run the following in a `cmd`
|
|
line session with Administrator privileges:
|
|
line session with Administrator privileges:
|
|
|
|
|
|
- R dir
|
|
|
|
- el cmd /c set R_VER=R-2.14.0 ^& R touch
|
|
|
|
|
|
+```
|
|
|
|
+R dir
|
|
|
|
+el cmd /c set R_VER=R-2.14.0 ^& R touch
|
|
|
|
+```
|
|
|
|
|
|
-The value of `R_VER` in the above line must be one of the directories listed
|
|
|
|
-by `R dir`. The `el.js` command used in the above code comes with these batch
|
|
|
|
-files and provides one way to elevate commands to have Administrator
|
|
|
|
|
|
+The value of `R_VER` in the above line must be one of the directories listed
|
|
|
|
+by `R dir`. The `el.js` command used in the above code comes with these batch
|
|
|
|
+files and provides one way to elevate commands to have Administrator
|
|
privileges.
|
|
privileges.
|
|
|
|
|
|
Note that `R SetReg` and `R touch` make permanent changes to the system
|
|
Note that `R SetReg` and `R touch` make permanent changes to the system
|
|
@@ -245,24 +262,24 @@ permanent changes.
|
|
1. If `.\Rgui.exe` exists use implied `R_PATH` and skip remaining points.
|
|
1. If `.\Rgui.exe` exists use implied `R_PATH` and skip remaining points.
|
|
|
|
|
|
2. If `.\{x64,i386}\Rgui.exe` or `.\bin\{x64,i386}\Rgui.exe` exists use implied
|
|
2. If `.\{x64,i386}\Rgui.exe` or `.\bin\{x64,i386}\Rgui.exe` exists use implied
|
|
-`R_HOME`.
|
|
|
|
|
|
+ `R_HOME`.
|
|
|
|
|
|
3. If `R_HOME` defined then derive any of `R_ROOT` and `R_VER` that are not
|
|
3. If `R_HOME` defined then derive any of `R_ROOT` and `R_VER` that are not
|
|
-already defined.
|
|
|
|
|
|
+ already defined.
|
|
|
|
|
|
-4. If `R_PATH` defined then derive any of `R_ROOT`, `R_HOME`, `R_VER` and
|
|
|
|
-`R_ARCH` that are not already defined.
|
|
|
|
|
|
+4. If `R_PATH` defined then derive any of `R_ROOT`, `R_HOME`, `R_VER` and
|
|
|
|
+ `R_ARCH` that are not already defined.
|
|
|
|
|
|
-5. If `R_REGISTRY=1` and R found in registry derive any of `R_HOME`, `R_ROOT`
|
|
|
|
-and `R_VER` that are not already defined.
|
|
|
|
|
|
+5. If `R_REGISTRY=1` and R found in registry derive any of `R_HOME`, `R_ROOT`
|
|
|
|
+ and `R_VER` that are not already defined.
|
|
|
|
|
|
6. If R_ROOT not defined try `%ProgramFiles%\R\*`, `%ProgramFiles(x86)%\R\*`
|
|
6. If R_ROOT not defined try `%ProgramFiles%\R\*`, `%ProgramFiles(x86)%\R\*`
|
|
- and then `%SystemRoot%\R` else error.
|
|
|
|
|
|
+ and then `%SystemRoot%\R` else error.
|
|
|
|
|
|
7. If `R_VER` not defined use last directory in `cd %R_ROOT% & dir /od`.
|
|
7. If `R_VER` not defined use last directory in `cd %R_ROOT% & dir /od`.
|
|
|
|
|
|
8. if `R_ARCH` not defined try `%R_ROOT%\%R_VER%\bin\x64\Rgui.exe` and then
|
|
8. if `R_ARCH` not defined try `%R_ROOT%\%R_VER%\bin\x64\Rgui.exe` and then
|
|
- `%R_ROOT%\%R_VER%\bin\i386\Rgui.exe`
|
|
|
|
|
|
+ `%R_ROOT%\%R_VER%\bin\i386\Rgui.exe`
|
|
|
|
|
|
9. If `R_ROOT`, `R_VER` and `R_ARCH` defined skip remaining points.
|
|
9. If `R_ROOT`, `R_VER` and `R_ARCH` defined skip remaining points.
|
|
|
|
|
|
@@ -270,19 +287,17 @@ and `R_VER` that are not already defined.
|
|
|
|
|
|
## #Rscript.bat ##
|
|
## #Rscript.bat ##
|
|
|
|
|
|
-This is not a separate batch file but is yet another way to call `R.bat`.
|
|
|
|
-Its purpose is to turn an R script into a Windows batch file.
|
|
|
|
|
|
+This is not a separate batch file but is yet another way to call `R.bat`.
|
|
|
|
+Its purpose is to turn an R script into a Windows batch file.
|
|
|
|
|
|
-1. Copy `R.bat` to a file with the name `#Rscript.bat` like this
|
|
|
|
-(from the Windows cmd line):
|
|
|
|
-
|
|
|
|
- copy R.bat #Rscript.bat
|
|
|
|
|
|
+1. Copy `R.bat` to a file with the name `#Rscript.bat` like this
|
|
|
|
+ (from the Windows cmd line): `copy R.bat #Rscript.bat`
|
|
|
|
|
|
2. Ensure that `#Rscript.bat` is on your windows path. Then we can turn an
|
|
2. Ensure that `#Rscript.bat` is on your windows path. Then we can turn an
|
|
-R script into a `.bat` file by
|
|
|
|
-(a) giving the R script a `.bat` extension and
|
|
|
|
-(b) putting this line as the
|
|
|
|
-first line in the script: `#Rscript %0 %*`
|
|
|
|
|
|
+ R script into a `.bat` file by
|
|
|
|
+ (a) giving the R script a `.bat` extension and
|
|
|
|
+ (b) putting this line as the
|
|
|
|
+ first line in the script: `#Rscript %0 %*`
|
|
|
|
|
|
This makes the script both a Windows batch file and an R script at the same
|
|
This makes the script both a Windows batch file and an R script at the same
|
|
time. When run as a batch file it will invoke `#Rscript.bat` which in turn
|
|
time. When run as a batch file it will invoke `#Rscript.bat` which in turn
|
|
@@ -292,12 +307,16 @@ be ignored since it would be regarded as a comment by R.)
|
|
|
|
|
|
For example, if we have a file `test.bat` with the following two lines:
|
|
For example, if we have a file `test.bat` with the following two lines:
|
|
|
|
|
|
- #Rscript %0 %*
|
|
|
|
- print(pi)
|
|
|
|
|
|
+```
|
|
|
|
+#Rscript %0 %*
|
|
|
|
+print(pi)
|
|
|
|
+```
|
|
|
|
|
|
then we can invoke it from the Windows cmd line like this:
|
|
then we can invoke it from the Windows cmd line like this:
|
|
|
|
|
|
- test
|
|
|
|
|
|
+```
|
|
|
|
+test
|
|
|
|
+```
|
|
|
|
|
|
## #Rscript2.bat ##
|
|
## #Rscript2.bat ##
|
|
|
|
|
|
@@ -311,25 +330,29 @@ simple to fix since the script itself is simple.
|
|
If you have a 64 bit system then the only part that needs to be changed is
|
|
If you have a 64 bit system then the only part that needs to be changed is
|
|
changing the definition of R_HOME to point to your version of R. If you
|
|
changing the definition of R_HOME to point to your version of R. If you
|
|
have a 32 bit system then you will also have to modify the definition of
|
|
have a 32 bit system then you will also have to modify the definition of
|
|
-R_ARCH on the appropriate line.
|
|
|
|
|
|
+R_ARCH on the appropriate line.
|
|
|
|
|
|
There is more information on this in the comments at the top of the script.
|
|
There is more information on this in the comments at the top of the script.
|
|
|
|
|
|
## Rpathset.bat ##
|
|
## Rpathset.bat ##
|
|
|
|
|
|
-The command
|
|
|
|
|
|
+The command
|
|
|
|
|
|
- Rpathset
|
|
|
|
|
|
+```
|
|
|
|
+Rpathset
|
|
|
|
+```
|
|
|
|
|
|
adds `R_PATH`, `R_MIKTEX_PATH` and `R_TOOLS` to the Windows path for the
|
|
adds `R_PATH`, `R_MIKTEX_PATH` and `R_TOOLS` to the Windows path for the
|
|
current `cmd` line session. No other `cmd` line sessions are affected and
|
|
current `cmd` line session. No other `cmd` line sessions are affected and
|
|
-there are no permanent changes to the system. Once this is run
|
|
|
|
|
|
+there are no permanent changes to the system. Once this is run
|
|
the R binaries will be on the path so they can be accessed directly without
|
|
the R binaries will be on the path so they can be accessed directly without
|
|
-`R.bat` .
|
|
|
|
|
|
+`R.bat`.
|
|
|
|
|
|
-`Rpathset` is an alternative to
|
|
|
|
|
|
+`Rpathset` is an alternative to
|
|
|
|
|
|
- R path
|
|
|
|
|
|
+```
|
|
|
|
+R path
|
|
|
|
+```
|
|
|
|
|
|
but unlike `R.bat`, `Rpathset.bat` does not have any automatic heuristics.
|
|
but unlike `R.bat`, `Rpathset.bat` does not have any automatic heuristics.
|
|
Instead, it requires that the user manually set the relevant variables in its
|
|
Instead, it requires that the user manually set the relevant variables in its
|
|
@@ -337,19 +360,21 @@ source. Running `Rpathset.bat` then sets the path accordingly and from then on
|
|
in the session one can access `Rgui.exe`, etc. on the path. Although
|
|
in the session one can access `Rgui.exe`, etc. on the path. Although
|
|
`Rpathset.bat` involves manual editing it does have the advantage that as a
|
|
`Rpathset.bat` involves manual editing it does have the advantage that as a
|
|
consequence it is very simple -- not much more than a collection of Windows
|
|
consequence it is very simple -- not much more than a collection of Windows
|
|
-batch set commands. This makes it easy to customize, less fragile to
|
|
|
|
|
|
+batch set commands. This makes it easy to customize, less fragile to
|
|
changes in the install procedures of `R` itself and is also more liklely to
|
|
changes in the install procedures of `R` itself and is also more liklely to
|
|
work on untested Windows configurations.
|
|
work on untested Windows configurations.
|
|
|
|
|
|
`Rpathset.bat` might be used like this:
|
|
`Rpathset.bat` might be used like this:
|
|
|
|
|
|
- Rpathset
|
|
|
|
- Rgui
|
|
|
|
|
|
+```
|
|
|
|
+Rpathset
|
|
|
|
+Rgui
|
|
|
|
+```
|
|
|
|
|
|
where `Rgui` is now directly accessing `Rgui.exe` as `Rpathset.bat` has added
|
|
where `Rgui` is now directly accessing `Rgui.exe` as `Rpathset.bat` has added
|
|
`R_PATH` to the Windows path.
|
|
`R_PATH` to the Windows path.
|
|
|
|
|
|
-The set statements are documented in the source of the `Rpathset.bat` file
|
|
|
|
|
|
+The set statements are documented in the source of the `Rpathset.bat` file
|
|
itself.
|
|
itself.
|
|
|
|
|
|
## movedir.bat and copydir.bat ##
|
|
## movedir.bat and copydir.bat ##
|
|
@@ -359,27 +384,30 @@ another. If used to transfer packages from one version of R to another it is
|
|
recommended that the user run `upgrade.packages()` in the target. For example,
|
|
recommended that the user run `upgrade.packages()` in the target. For example,
|
|
assuming the default location for the user libraries:
|
|
assuming the default location for the user libraries:
|
|
|
|
|
|
- cd %userprofile%\Documents\win-library
|
|
|
|
- copydir 2.15\library 3.0\library
|
|
|
|
|
|
+```
|
|
|
|
+cd %userprofile%\Documents\win-library
|
|
|
|
+copydir 2.15\library 3.0\library
|
|
|
|
|
|
- R.bat gui
|
|
|
|
- ... now enter update.packages(checkBuilt=TRUE) into R...
|
|
|
|
|
|
+R.bat gui
|
|
|
|
+... now enter update.packages(checkBuilt=TRUE) into R...
|
|
|
|
+```
|
|
|
|
|
|
(The `checkBuilt=TRUE` argument forces a rebuild and is normally not required
|
|
(The `checkBuilt=TRUE` argument forces a rebuild and is normally not required
|
|
when upgrading to another version that differs only in the minor version
|
|
when upgrading to another version that differs only in the minor version
|
|
number, e.g. from 2.15.2 to 2.15.3.)
|
|
number, e.g. from 2.15.2 to 2.15.3.)
|
|
|
|
|
|
-`movedir.bat` and `copydir.bat` will not overwrite any existing package in the
|
|
|
|
-target library so they are particularly safe to use. (If you do wish to
|
|
|
|
|
|
+`movedir.bat` and `copydir.bat` will not overwrite any existing package in the
|
|
|
|
+target library so they are particularly safe to use. (If you do wish to
|
|
overwrite such packages delete them from the target first using the Windows
|
|
overwrite such packages delete them from the target first using the Windows
|
|
`del` command.)
|
|
`del` command.)
|
|
|
|
|
|
-
|
|
|
|
## el.js ##
|
|
## el.js ##
|
|
|
|
|
|
`el.js` runs its arguments elevated (i.e. with Administrator privileges). For example,
|
|
`el.js` runs its arguments elevated (i.e. with Administrator privileges). For example,
|
|
|
|
|
|
- el R touch
|
|
|
|
|
|
+```
|
|
|
|
+el R touch
|
|
|
|
+```
|
|
|
|
|
|
The user will be prompted to allow elevation to proceed.
|
|
The user will be prompted to allow elevation to proceed.
|
|
|
|
|
|
@@ -392,7 +420,7 @@ with `vim` or other editor. See the source for additional instructions.
|
|
|
|
|
|
This program displays a window showing where MiKTeX was found. It uses the
|
|
This program displays a window showing where MiKTeX was found. It uses the
|
|
MiKTeX API. This API is not used by `R.bat` . Instead `R.bat` just looks in
|
|
MiKTeX API. This API is not used by `R.bat` . Instead `R.bat` just looks in
|
|
-common places. (Using this API may be incorporated into the `R.bat` heuristic
|
|
|
|
|
|
+common places. (Using this API may be incorporated into the `R.bat` heuristic
|
|
in the future.)
|
|
in the future.)
|
|
|
|
|
|
## make-batchfiles-pdf.bat ##
|
|
## make-batchfiles-pdf.bat ##
|
|
@@ -402,5 +430,6 @@ This batch file creates a pdf of this documentation from the markdown file
|
|
found [here](https://code.google.com/p/pandoc/downloads/list). It is run
|
|
found [here](https://code.google.com/p/pandoc/downloads/list). It is run
|
|
without arguments:
|
|
without arguments:
|
|
|
|
|
|
- make-batchfiles-pdf
|
|
|
|
-
|
|
|
|
|
|
+```
|
|
|
|
+make-batchfiles-pdf
|
|
|
|
+```
|