# NOT RUN {
##load data
data(mesa.model)
##Mark 30% of observations
I <- runif(dim(mesa.model$obs)[1])<.3
##drop these observations
mesa.model.new <- dropObservations(mesa.model, I)
##This reduces the remaining number of observations
print(mesa.model)
print(mesa.model.new)
# }
# NOT RUN {
##create cross validation structure
Icv <- createCV(mesa.model, groups=10)
##drop observations from the second CV group
mesa.model.new <- dropObservations(mesa.model, Icv==2)
##This reduces the remaining number of observations (and locations)
print(mesa.model)
print(mesa.model.new)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab