| cut.folder {dad} | R Documentation |
In a folder: change numeric variables into factors
Description
This function applies to a folder. For each elements (data frames) of this folder, it changes its numerical columns into factors, using cut.data.frame.
Usage
## S3 method for class 'folder'
cut(x, breaks, labels = NULL, include.lowest = FALSE, right = TRUE, dig.lab = 3L,
ordered_result = FALSE, cutcol = NULL, ...)
Arguments
x |
an object of class |
breaks |
list or numeric, defining the intervals into which the variables of each element of the folder is to be cut.
See |
labels |
list of character vectors. If not omitted, it gives the labels for the intervals of each column of the elements of |
include.lowest |
logical, indicating if a value equal to the lowest (or highest, for |
right |
logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa (see |
dig.lab |
integer or integer vector, which is used when labels are not given.
It determines the number of digits used in formatting the break numbers.
See |
ordered_result |
logical: should the results be ordered factors? (see |
cutcol |
numeric vector: indices of the columns of the elements of |
... |
further arguments passed to or from other methods. |
Value
An object of class folder with the same length and names as x.
Its elements (data frames) have the same column and row names as the elements of x.
For more details, see cut.data.frame
Author(s)
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Sabine Demotes-Mainard
Examples
data("roses")
x <- as.folder(roses[, c("Sha", "Den", "Sym", "rose")], groups = "rose")
summary(x)
x3 <- cut(x, breaks = 3)
summary(x3)
x7 <- cut(x, breaks = 7)
summary(x7)