Function to return the column number if a given pattern is contained in the column names of a data
getColumnNoForPatternInColumnname(pattern, column.names)
a string that needs to be checked
column names actually have
column number, if success -1, if failure
# NOT RUN { getColumnNoForPatternInColumnname("age","female_age") # }
Run the code above in your browser using DataCamp Workspace