powered by
Flip an object.
flip(x, ...)# S3 method for default flip(x, ...)# S3 method for matrix flip(x, by = c("rows", "columns"), keep_rownames = NULL, ...)# S3 method for data.frame flip(x, by = c("rows", "columns"), keep_rownames = NULL, ...)
# S3 method for default flip(x, ...)
# S3 method for matrix flip(x, by = c("rows", "columns"), keep_rownames = NULL, ...)
# S3 method for data.frame flip(x, by = c("rows", "columns"), keep_rownames = NULL, ...)
A vector of values, equal length of x that is reversed or a data frame with flipped rows/columns
vector
x
data frame
An object
Additional arguments passed to methods
Flip by "rows" or "columns" (partial matches accepted)
"rows"
"columns"
Logical, if TRUE will not reset row names; NULL
TRUE
NULL
flip(letters[1:3]) flip(seq.int(9, -9, by = -3)) flip(head(iris)) flip(head(iris), keep_rownames = TRUE) flip(head(iris), by = "col")
Run the code above in your browser using DataLab