Match a given vector to column names of a data.frame or matrix
matchColumnName(data.frame.cols, reqCols, ignore.case = FALSE)
A vector of integers as indices
myTestDf <- data.frame(HBV=1:3, VFB=0:2, BVB=4:6, FCB=2:4)
myFavTeams <- c("HBV", "BVB")
matchColumnName(myTestDf, myFavTeams)
#> [1] 1 3
myFavTeamsCase <- c("hbv", "bVb")
matchColumnName(myTestDf, myFavTeamsCase, ignore.case=TRUE)
#> [1] 1 3
## NA will be returned in this case if ignore.case is set to FALSE
matchColumnName(myTestDf, myFavTeamsCase, ignore.case=FALSE)
#> [1] NA NA