data(gdental)
(x <- gdental[1]) # select column 1
class(x) # no longer a grouped.data object
class(gdental[2]) # same
gdental[, 1] # group boundaries
gdental[, 2] # group frequencies
gdental[1:4,] # a subset
gdental[c(1, 3, 5),] # avoid this
gdental[1:2, 1] <- c(0, 30, 60) # modified boundaries
gdental[, 2] <- 10 # modified frequencies
if (FALSE) gdental[1, ] <- 2 # not allowed
Run the code above in your browser using DataLab