I would like to know how to select columns containing a word in the header
I have a file like this and i want to get the columns containing the words param1, param2.
fileV1.txt
v1.param1 v1.param2 other.param
value value value
fileV2.txt
v2.param1 v2.param2 otherParam
value value value
#selectCol <- c("param1", "param2")
#dt.v1 <- data.table::fread(path.v1, select = selectCol, fill = T, header = T)
#dt.v2 <- data.table::fread(path.v2, select = selectCol, fill = T, header = T)