Last chance! 50% off unlimited learning
Sale ends in
crosstab(x, y, ...)
crosstab(x, y, digits=0, long=FALSE, progress)
digits
Integer. The number of digits for rounding the values before cross-tabulation
long
Logical. If TRUE
the results are returned in 'long' format (matrix with three columns) instead of a table
progress
Character. "text", "window", or "" (the default, no progress bar)
...
Additional arguments that can be passed on to table
, such as exclude=NULL
to include NA
values in the tabulation
}freq
, zonal
r <- raster()
r[] = runif(ncell(r)) * 5
s = setValues(r, runif(ncell(r)) * 10)
crosstab(r,s)
Run the code above in your browser using DataLab