Learn R Programming

IPDFileCheck (version 0.8.1)

keep_required_columns: ############################################################################ Function to keep only certain variables

Description

############################################################################ Function to keep only certain variables

Usage

keep_required_columns(variables, the_data)

Value

subset

Arguments

variables

list of variables

the_data

data to be sub setting

Examples

Run this code
the_data <- data.frame("Age" = c(21, 15), "sex" = c("m", "f"))
variable <- "Age"
keep_required_columns(variable, the_data)

Run the code above in your browser using DataLab