Dataclass-class {distrSim}R Documentation

Class "Dataclass"

Description

In an object of type "Dataclass" data can be saved containing any number of runs in any dimension. All information about the data is stored in a unified way.

Objects from the Class

Objects can be created by calls of the form Dataclass(filename, Data). A Dataclass-object includes, aside from the actual data, a filename and the number of runs and the size of the sample, which give the number of rows and columns of the data matrix.

Slots

filename:
Object of class "character": the filename the data shall be saved
Data:
Object of class "vectororNULL": the actual data, either of type "NULL" (means no data) or "vector"
runs:
Object of class "numeric": the number of runs of the data
samplesize:
Object of class "numeric": the size of the sample

Methods

Data
signature(object = "Dataclass"): returns the actual data
Data<-
signature(object = "Dataclass"): changes the data
evaluate
signature(object = "Dataclass", estimator = "function"):

creates an object of type "Evaluation", see there for further information

filename
signature(object = "Dataclass"): returns the the filename
filename<-
signature(object = "Dataclass"): changes the the filename
initialize
signature(.Object = "Dataclass"): initialize method
runs
signature(object = "Dataclass"): returns the number of runs
samplesize
signature(object = "Dataclass"): returns the size of the sample
savedata
signature(object = "Dataclass"): saves the object in the directory of R and also a copy without data
plot
signature(x = "Dataclass"): produces a plot of the data matrix
print
signature(x = "Dataclass"): returns filename, number of runs and the size of the sample
summary
signature(object = "Dataclass"): returns the same information as print, moreover a statistical summary for each run

Note

The saved Dataclass can be loaded with the usual load-command, the saved comment with the function cload.

Author(s)

Thomas Stabla Thomas.Stabla@uni-bayreuth.de,
Florian Camphausen Florian.Camphausen@uni-bayreuth.de,
Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
Matthias Kohl Matthias.Kohl@stamats.de

See Also

Simulation-class Contsimulation-class Evaluation-class plot-methods
print-methods summary-methods load cload savedata-methods

Examples

D <- Dataclass(Data = matrix(c(1,2,3,4,5,6),2),
               filename = "xyz.sav")
# A new object of type "Dataclass" is created.
savedata(D)
# creates a file called "xyz.sav" where the information is saved and a
# copy "xyz.sav.comment" without data
Data(D) <- matrix(c(11,12,13,14,15,16),2) # changes the data of D
cload("xyz.sav") # loads the object without data - it is called "D.comment"
D.comment
load("xyz.sav") # loads the original object "D"
Data(D) # the original data: matrix(c(1,2,3,4,5,6),2)
#if you have distrTEst available:
#evaluate(object = D, estimator = mean) # returns the mean of each variable

[Package distrSim version 1.6 Index]