# NOT RUN {
x <- matrix(sample(c(0:5), size = 100, replace = TRUE,
prob = c(.6,.08,.08,.08,.08,.08)), nrow = 20, byrow = TRUE)
x <- defineData(x)
colRatings(x)
rowRatings(x)
numRatings(x)
sparsity(x)
a <- x[1:10,2:3]
# }
Run the code above in your browser using DataLab