| Line 33... |
Line 33... |
| 33 |
examples. Most platforms (and POSIX) do not allow names containing
|
33 |
examples. Most platforms (and POSIX) do not allow names containing
|
| 34 |
\code{"="}. Windows does, but the facilities provided by \R may not
|
34 |
\code{"="}. Windows does, but the facilities provided by \R may not
|
| 35 |
handle these correctly so they should be avoided. Most platforms
|
35 |
handle these correctly so they should be avoided. Most platforms
|
| 36 |
allow setting an environment variable to \code{""}, but Windows does
|
36 |
allow setting an environment variable to \code{""}, but Windows does
|
| 37 |
not, and there \code{Sys.setenv(FOO = "")} unsets \env{FOO}.
|
37 |
not, and there \code{Sys.setenv(FOO = "")} unsets \env{FOO}.
|
| 38 |
|
38 |
|
| 39 |
There may be system-specific limits on the maximum length of the values
|
39 |
There may be system-specific limits on the maximum length of the values
|
| 40 |
of individual environment variables or of all environment variables.
|
40 |
of individual environment variables or of all environment variables.
|
| 41 |
#ifdef windows
|
41 |
#ifdef windows
|
| 42 |
Windows has a limit of 32,767 characters on the environment block, and
|
42 |
Windows has a limit of 32,767 characters on the environment block, and
|
| 43 |
\code{cmd.exe} has a limit of 2047 (Windows 2000) or 8192 characters
|
43 |
\code{cmd.exe} has a limit of 2047 (Windows 2000) or 8192 characters
|
| Line 47... |
Line 47... |
| 47 |
% http://support.microsoft.com/kb/830473
|
47 |
% http://support.microsoft.com/kb/830473
|
| 48 |
|
48 |
|
| 49 |
#ifdef unix
|
49 |
#ifdef unix
|
| 50 |
\note{
|
50 |
\note{
|
| 51 |
If \code{Sys.unsetenv} is not supported, it will at least try to
|
51 |
If \code{Sys.unsetenv} is not supported, it will at least try to
|
| 52 |
set the value of the environment variable to \code{""}, with a
|
52 |
set the value of the environment variable to \code{""}, with a
|
| 53 |
warning.
|
53 |
warning.
|
| 54 |
}
|
54 |
}
|
| 55 |
#endif
|
55 |
#endif
|
| 56 |
\seealso{
|
56 |
\seealso{
|
| 57 |
\code{\link{Sys.getenv}}, \link{Startup} for ways to set environment
|
57 |
\code{\link{Sys.getenv}}, \link{Startup} for ways to set environment
|
| 58 |
variables for the \R session.
|
58 |
variables for the \R session.
|
| 59 |
|
59 |
|
| 60 |
\code{\link{setwd}} for the working directory.
|
60 |
\code{\link{setwd}} for the working directory.
|
| 61 |
|
61 |
|
| 62 |
|
62 |
|
| 63 |
The help for \sQuote{\link{environment variables}} lists many of the
|
63 |
The help for \sQuote{\link{environment variables}} lists many of the
|
| 64 |
environment variables used by \R.
|
64 |
environment variables used by \R.
|