Last chance! 50% off unlimited learning
Sale ends in
flip(x, direction, ...)
filename
Character. Output filename
format
Character. Output file type. See writeRaster
datatype
Character. Output data type. See dataType
overwrite
Logical. If TRUE
, "filename" will be overwritten if it exists
progress
Character. "text", "window", or "" (the default, no progress bar)
}
direction
can also be indicated with 1 (=x) or 2 (=y)t
, rotate
r <- raster(nrow=18, ncol=36)
m <- matrix(1:ncell(r), nrow=18)
r[] <- as.vector(t(m))
rx <- flip(r, direction='x')
r[] <- as.vector(m)
ry <- flip(r, direction='y')
Run the code above in your browser using DataLab