Learn R Programming

x12 (version 1.0-2)

prev-methods: ~~ Methods for Function prev and cleanHistory in Package x12 ~~

Description

Function prev in package x12 reverts to previous parameter settings and output. Function cleanHistory resets x12OldParameter and x12OldOutput.

Usage

## S3 method for class 'x12Single':
prev(object,n=NULL)
## S3 method for class 'x12Batch':
prev(object,index=NULL,n=NULL)
## S3 method for class 'x12Single':
cleanHistory(object)
## S3 method for class 'x12Batch':
cleanHistory(object,index=NULL)

Arguments

object
object of class x12Single-class or x12Batch-class.
n
index corresponding to a previous run.
index
index corresponding to (an) object(s) of class "x12Single".

See Also

X12

Examples

Run this code
data(AirPassengersX12)
summary(AirPassengersX12)
# a maximum of 10 previous X12 runs are added to the summary
summary(AirPassengersX12,oldOutput=10)
#the x12Parameter and x12Output of the x12Single is set to the previous run of X12
Ap=prev(AirPassengersX12)
summary(AirPassengersX12,oldOutput=10)

Run the code above in your browser using DataLab