## minimal example
ng.iris <- ng_data(name = "iris", data = iris[,1:4])
ng.iris ## see output
## full specification
ng.iris <- ng_data(name = "iris", data = iris[,1:4],
shortnames = c('s.L', 's.W', 'p.L', 'p.W'),
group = iris$Species,
labels = substr(iris$Species,1,2))
## see shortnames
shortnames(ng.iris)
## change shortnames
shortnames(ng.iris) <- c("a","b","c","d")
## see variable names
names(ng.iris)
## change variable names
names(ng.iris) <- LETTERS[1:4]
## ng_get
ng_get(ng.iris)
ng_get(ng.iris,"group")
## ng_set
ng_set(ng.iris)
ng_set(ng.iris,"group") <- iris$Species
Run the code above in your browser using DataLab