rankdf {ammistability} | R Documentation |
Ranks in a data.frame
Description
Ranks in a data.frame
Usage
rankdf(df, increasing = NULL, decreasing = NULL, ...)
Arguments
df |
A data frame. |
increasing |
A character vector of column names of the data frame to be ranked in increasing order. |
decreasing |
A character vector of column names of the data frame to be ranked in decreasing order. |
... |
Additional arguments to be passed on to
|
Value
A data frame with the ranks computed in the columns specified in
arguments increasing
and decreasing
.
Examples
library(agricolae)
data(soil)
dec <- c("pH", "EC")
inc <- c("CaCO3", "MO", "CIC", "P", "K", "sand",
"slime", "clay", "Ca", "Mg", "K2", "Na", "Al_H", "K_Mg", "Ca_Mg",
"B", "Cu", "Fe", "Mn", "Zn")
soilrank <- rankdf(soil, increasing = inc, decreasing = dec)
soilrank
[Package ammistability version 0.1.4 Index]