loadP(x12)
loadP()所属R语言包:x12
loadP and saveP
loadP和saveP
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Functions loadP and saveP load and save parameter settings.
功能loadP和saveP加载和保存参数设置。
用法----------Usage----------
## S4 method for signature 'x12Single'
loadP(object, file)
## S4 method for signature 'x12Batch'
loadP(object, file)
## S4 method for signature 'x12Parameter'
loadP(object, file)
## S4 method for signature 'x12Single'
saveP(object, file)
## S4 method for signature 'x12Batch'
saveP(object, file)
## S4 method for signature 'x12Parameter'
saveP(object, file)
参数----------Arguments----------
参数:object
object of class x12Single-class, x12Batch-class or x12Parameter-class.
对象类x12Single-class,x12Batch-class或x12Parameter-class。
参数:file
filepath
文件路径
方法----------Methods----------
参见----------See Also----------
X12, x12Batch
X12,x12Batch
实例----------Examples----------
## Not run: [#不运行:]
#Create new batch object with 4 time series and change some parameters[创建一批新的对象有4个时间序列,并改变一些参数]
xb <- new("x12Batch",list(AirPassengers,AirPassengers,AirPassengers,AirPassengers))
xb <- setP(xb,list(automdl=FALSE))
xb <- setP(xb,list(arima=c(1,1,0),sarima=c(1,1,0)),1)
xb <- setP(xb,list(arima=c(0,1,1),sarima=c(0,1,1)),2)
xb <- setP(xb,list(arima=c(0,1,1),sarima=c(1,1,1)),3)
xb <- setP(xb,list(arima=c(1,1,1),sarima=c(1,1,1)),4)
#save all parameters[保存所有参数]
saveP(xb,file="xyz.RData")
xb1 <- new("x12Batch",list(AirPassengers,AirPassengers,AirPassengers,AirPassengers))
#load all parameters and save it to the corresponding series inside a x12Batch-object[加载的所有参数,并将其保存到相应的系列内x12Batch对象]
xb1 <- loadP(xb1,file="xyz.RData")
xs <- new("x12Single",ts=AirPassengers)
xs <- setP(xs,list(arima=c(2,1,1),sarima=c(2,1,1)))
#Save the parameters[保存参数]
saveP(xs,file="xyz1.RData")
#Load a saved parameter set to a x12Single object[载入保存的参数设置为一个x12Single对象]
xs <- new("x12Single",ts=AirPassengers)
xs <- loadP(xs,file="xyz1.RData")
#Replace all parameters in a x12Batch object with one parameter set[更换在x12Batch对象的所有参数一个参数集]
xb <- new("x12Batch",list(AirPassengers,AirPassengers,AirPassengers,AirPassengers))
xb <- loadP(xb,file="xyz1.RData")
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|