powered by
Function to return the column number for column name
get_columnno_fornames(data, column_name)
column number, if success error, if failure
a data frame
column names of the data frame
get_columnno_fornames(data.frame("Age" = c(21, 15), "Name" = c("John", "Dora")), "Name")
Run the code above in your browser using DataLab