Learn R Programming

IPDFileCheck (version 0.8.1)

get_columnno_fornames: Function to return the column number for column name

Description

Function to return the column number for column name

Usage

get_columnno_fornames(data, column_name)

Value

column number, if success error, if failure

Arguments

data

a data frame

column_name

column names of the data frame

Examples

Run this code
get_columnno_fornames(data.frame("Age" = c(21, 15),
"Name" = c("John", "Dora")), "Name")

Run the code above in your browser using DataLab