powered by
..
subset_(x, subset, select, select_pattern, avoid, avoid_pattern)
Function subset_ returns a data.frame, with additional attributes
attr(,'vline')
integer scalar, position of a vertical line (see ?flextable::vline)
?flextable::vline
attr(,'jhighlight)'
character vector, names of columns to be flextable::highlighted.
flextable::highlight
a data.frame
logical expression, see function subset.data.frame
character vector, columns to be selected, see function subset.data.frame
regular expression regex for multiple columns to be selected
character vector, columns to be avoided
regular expression regex, for multiple columns to be avoided
Function subset_ is different from subset.data.frame, such that
if both select and select_pattern are missing, only variables mentioned in subset are selected;
select
select_pattern
subset
be able to select all variables, except those in avoid and avoid_pattern;
avoid
avoid_pattern
always returns data.frame, i.e., forces drop = FALSE
drop = FALSE
subset_(trees, Girth > 9 & Height < 70) subset_(swiss, Fertility > 80, avoid = 'Catholic') subset_(warpbreaks, wool == 'K')
Run the code above in your browser using DataLab