[x] column subsetting is consistent with standard data.frame behavior #2
[x] we can have a select_if equivalent by using ? as in iris_tb[?is.numeric]
[x] we can have a select_at equivalent by providing a regex pattern in a one sided formula, for instance, iris_tb[?^Sepal"]
[x] ? returns a character vector in the context of a tb so c(?is.numeric, "Sepal.Width") is a legit combination, we take unique values ultimately, which means that duplicate columns are impossible
[x] If we want to transmute, we can do iris_tb[, s(Sepal.Area = Sepal.Width * Sepal.Length, "Species")], or iris_tb[, s(?is.numeric := log)] where s() returns a "tb_selection" object that .j knows how to interpret.
[x] We can use bare column names in s(), only symbols aren't evaluated so c(cols) or .(cols) will work if we need the content of the variable.
[x] if a case is not covered, we can operate on names(.x) in any case either in .j directly or in an unnamed argument of s()
[ x] col_a:col_b is supported like in data.tablebut in data.table it's supported only in j directly, and not in .() or in c(), in our case : is redefined to consider column names as their numerical index anywhere in [
select_if
equivalent by using?
as iniris_tb[?is.numeric]
select_at
equivalent by providing a regex pattern in a one sided formula, for instance,iris_tb[?^Sepal"]
?
returns a character vector in the context of atb
soc(?is.numeric, "Sepal.Width")
is a legit combination, we take unique values ultimately, which means that duplicate columns are impossibleiris_tb[, s(Sepal.Area = Sepal.Width * Sepal.Length, "Species")]
, oriris_tb[, s(?is.numeric := log)]
wheres()
returns a "tb_selection" object that.j
knows how to interpret.s()
, only symbols aren't evaluated soc(cols)
or.(cols)
will work if we need the content of the variable.names(.x)
in any case either in.j
directly or in an unnamed argument ofs()
col_a:col_b
is supported like in data.tablebut in data.table it's supported only inj
directly, and not in.()
or inc()
, in our case:
is redefined to consider column names as their numerical index anywhere in[