Function to return the column number for column name
getColumnNoForNames(data, column.name)
a data frame
column names of the data frame
column number, if success -1, if failure
# NOT RUN { getColumnNoForNames(data.frame("Age" = c(21,15), "Name" = c("John","Dora")),"Name") # }
Run the code above in your browser using DataLab