colselect: Select columns from a data frame using a character vector or...

Description Usage Arguments Value Examples

View source: R/manipulate_data.R

Description

Select columns from a data frame using a character vector or numeric vector

Usage

1
2
colselect(df, colchars = c(), colnumbs = c(), complete_names = TRUE,
  df_order = TRUE, print.colnames = FALSE, print.colnumbs = FALSE)

Arguments

df

A data frame

colchars

A character vector of column names (default: c())

colnumbs

A numeric vector of column numbers (default: c())

complete_names

Boolean determining if the entered strings are exact column names (rather than fragments of column names) (default: TRUE)

df_order

Boolean that determines if the columns selected are returned in the order they appear in df (rather than the order they appear in colchars) (default: TRUE)

print.colnames

Boolean determining if selected column names should be printed upon completion (default: FALSE)

print.colnumbs

Boolean determining if selected column numbers should be printed upon completion (default: FALSE)

Value

A data frame consisting of the columns from df whose names match the character vector colchars in the order that the appear in the column names of df

Examples

1
2
colselect(df = Fincher, colchars = c("dd_Smed_v4_12", "dd_Smed_v4_22"),
          complete_names = FALSE, df_order = FALSE, print.colnumbs = TRUE)

adamnc2/simpleSCDE documentation built on May 7, 2019, 7:40 a.m.