testrwm(rwm)
testrwm()所属R语言包:rwm
Test setup for rwm package
测试设置RWM包
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Tests that the variable .UserDirectory has a valid setting.
测试的变量.UserDirectory有一个有效的设置。
用法----------Usage----------
testrwm()
Details
详细信息----------Details----------
Returns TRUE if all of the following are true. First that .UserDirectory is set and second that it is set to a valid directory. Second .UserDate must be set to valid directory name. Third either the directory specificed by .UserDirectory <> .UserDate exists or the base function dir.create is successful in creating it.
返回TRUE,如果以下是真实的。首先,.UserDirectory设置和第二,它可以被设置为一个有效的目录。第二个.UserDate必须被设置为有效的目录名。的第三任一目录specificed:“.UserDirectory <> .UserDate存在或基函数dir.create的是创建它的成功。
Uses base R functions exists, file.exists and dir.create.
使用碱基的R函数exists,file.exists和dir.create。
值----------Value----------
Returns TRUE or FALSE according if the setup is valid
返回TRUE或FALSE如果设定有效
注意----------Note----------
This function is used by most of the other functions to validate the setup before attempting to run. The global variable .UserDirectory may be set manually as in the examples rwm/ rwm/g rwm/g rwm/g rwm/g rwm/g rwm/g below and it can be set by running rwmInit().
这个函数是用来验证设置,然后再尝试运行的其他功能。全局变量.UserDirectory手动设置RWM / RWM /克RWM /克RWM /克RWM /克RWM /克RWM / g以下的例子,它可以通过运行rwmInit()。
(作者)----------Author(s)----------
A.I. McLeod
参见----------See Also----------
loadws, savews, rwm/ rwm/g rwm/g rwm/g rwm/g rwm/g rwm/g rwmInit
loadws,savews,RWM / RWM /ĝ的RWM /克RWM /克RWM /克RWM /克RWM /克rwmInit
实例----------Examples----------
#INITIALIZATION[初始化]
#Normally .UserDirectory and .UserDate are defined previously. [正常。userDirectory的。UserDate前面所定义。]
#Usually a more convenient directory is used but for illustration[通常是一个更方便的目录中使用,但说明]
#using a script which will run in interactive or batch mode on any computer:[使用一个脚本,将运行在任何一台计算机的交互或批处理模式:]
.UserDirectory <- tempdir()
.UserDate <- "2008"
dir.create(paste(.UserDirectory, .UserDate, sep="/"))
# Example 1: test the above setup is valid[实施例1:测试上面的设置是有效的]
testrwm()
#Example 2: .UserDirectory is not set[实施例2:。userDirectory的设置不]
rm(.UserDirectory)
testrwm()
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|