Sys.setenv(base)
Sys.setenv()所属R语言包:base
Set or Unset Environment Variables
设置或取消环境变量
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Sys.setenv sets environment variables (for other processes called from within R or future calls to Sys.getenv from this R process).
Sys.setenv设置环境变量(在R或将来调用Sys.getenv这个R进程调用的其他进程)。
Sys.unsetenv removes environment variables.
Sys.unsetenv删除环境变量。
用法----------Usage----------
Sys.setenv(...)
Sys.unsetenv(x)
参数----------Arguments----------
参数:...
named arguments with values coercible to a character string.
与强制转换为字符串值命名参数。
参数:x
a character vector, or an object coercible to character.
一个字符向量,或者一个对象强制转换为字符。
Details
详情----------Details----------
Non-standard R names must be quoted in Sys.setenv: see the examples. Most platforms (and POSIX) do not allow names containing "=". Windows does, but the facilities provided by R may not handle these correctly so they should be avoided. Most platforms allow setting an environment variable to "", but Windows does not, and there Sys.setenv(FOO="") unsets FOO.
非标准的R名称必须引用Sys.setenv:看到的例子。大多数平台(和POSIX)不允许含有"="的名称。 Windows一样,但由R提供的设施可能无法处理这些正确的,所以他们应避免。大多数平台可以设置环境变量"",但Windows不,有Sys.setenv(FOO="")取消设置FOO。
There may be system-specific limits on the maximum length of the values of individual environment variables or of all environment variables. Windows has a limit of 32,767 characters on the environment block, and cmd.exe has a limit of 2047 (Windows 2000) or 8192 characters (XP and later) for each value.
有可能是系统特定的限制,对个人的环境变量或所有的环境变量的值的最大长度。 Windows有一个对环境块的32,767个字符的限制,cmd.exe的2047(Windows 2000)或8192个字符限制为每个值(XP和更高版本)。
值----------Value----------
A logical vector, with elements being true if (un)setting the corresponding variable succeeded. (For Sys.unsetenv this includes attempting to remove a non-existent variable.)
一个逻辑向量,如果(联合国)设置相应的变量成功的元素。 (Sys.unsetenv这包括试图删除一个不存在的变量。)
参见----------See Also----------
Sys.getenv, Startup for ways to set environment variables for the R session.
Sys.getenv,启动方式设置R会话的环境变量。
setwd for the working directory.
setwd工作目录。
The help for "environment variables" lists many of the environment variables used by R.
“环境变量”列表帮助许多由R.使用的环境变量
举例----------Examples----------
print(Sys.setenv(R_TEST="testit", "A+C"=123)) # `A+C` could also be used[A +也可以被用来]
Sys.getenv("R_TEST")
Sys.unsetenv("R_TEST")
Sys.getenv("R_TEST", unset=NA)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|