# NOT RUN {
r <- rast(nrow=10, ncol=10)
set.seed(2)
values(r) <- sample(5, ncell(r), replace=TRUE)
freq(r, FALSE)
freq(r)
x <- c(r, r/3)
freq(x, FALSE)
freq(x)
freq(x, digits=1)
freq(x, digits=-1)
freq(x, value=5)
# }
Run the code above in your browser using DataLab