drop_vars_from_dataframe: Drop Variables From Dataframe

View source: R/drop_vars_from_dataframe.R

drop_vars_from_dataframeR Documentation

Drop Variables From Dataframe

Description

Drop the variables defined in the format table from a specific dataframe.

Usage

drop_vars_from_dataframe(
  df,
  formats_df = formats,
  post_dm = FALSE,
  drop_cmd = "drop"
)

Arguments

df

dataframe

formats_df

dataframe defining the formats. Must be in standard format containing columns Variable_name, Drop_from_analysis_file and Sorting_order.

post_dm

Logical; if FALSE, all variables are added as part of data management steps defined as "not imported" in column Import_format of the formats file will be omitted.

drop_cmd

String; defines the character string in column Drop_from_analysis_file of the formats table to indicate that the variable should be dropped. By default drop_cmd = "drop"

Value

dataframe


marianschmidt/msAutolabelR documentation built on April 17, 2022, 7:42 a.m.