powered by
Rows are sorted by fields in covariates or by a provided sort key of length equal to the number of rows.
# S3 method for capthist sort(x, decreasing = FALSE, by = "", byrowname = TRUE,...)# S3 method for mask sort(x, decreasing = FALSE, by = "", byrowname = TRUE,...)
# S3 method for mask sort(x, decreasing = FALSE, by = "", byrowname = TRUE,...)
capthist or mask object with sorted rows; any relevant attributes are also sorted (covariates, signal, xy)
capthist
mask
capthist object
logical. Should the sort be increasing or decreasing?
character vector (names of covariates) or data frame whose columns will be used as sort keys
logical. Should row name be used as a final sort key?
other arguments (not used)
For multi-session capthist objects only the named covariate form is suitable as the number of rows varies between sessions.
If requested, rows are sorted by rowname within by. The effect of the defaultsis to sort by rowname.
by
The attribute markingpoints of a mask object is removed if present, as it is no longer meaningful.
sort(ovenCH, by = "Sex") covariates(ovenCH)[["2005"]] covariates(sort(ovenCH, by = "Sex"))[["2005"]]
Run the code above in your browser using DataLab