Learn R Programming

valueEQ5D (version 0.6.1)

get_column_no_colnames: Function to return the column number for column name

Description

Function to return the column number for column name

Usage

get_column_no_colnames(data, column_name)

Arguments

data

a data frame

column_name

column names of the data frame

Value

column number, if success -1, if failure

Examples

Run this code
# NOT RUN {
get_column_no_colnames(data.frame(age = rep(20, 4), 
sex = rep("male", 4)), "sex")
# }

Run the code above in your browser using DataLab