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)
evaluate(object = D, estimator = mean) # returns the mean of each variable
Run the code above in your browser using DataCamp Workspace