R/030_init.R
inc.Rd
Select (include) columns by character or numeric vector.
inc(x, idx)
tabular data.
Character or numeric vector: Column names or indices to include.
data.frame, tibble, or data.table.
EDG
inc(iris, c(3, 4)) |> head()
#> Petal.Length Petal.Width #> 1 1.4 0.2 #> 2 1.4 0.2 #> 3 1.3 0.2 #> 4 1.5 0.2 #> 5 1.4 0.2 #> 6 1.7 0.4
inc(iris, c("Sepal.Length", "Species")) |> head()
#> Sepal.Length Species #> 1 5.1 setosa #> 2 4.9 setosa #> 3 4.7 setosa #> 4 4.6 setosa #> 5 5.0 setosa #> 6 5.4 setosa