R - as.list(): convert element of a vector to element of list

26 Aug 2017

datasetList <- c("DI", "IS", "MrTADFinder")
# [1] "DI"          "IS"          "MrTADFinder"

as.list(setNames(datasetList, paste(datasetList, "domains")))
# $`DI domains`
# [1] "DI"
# $`IS domains`
# [1] "IS"
# $`MrTADFinder domains`
# [1] "MrTADFinder"
[ R  function  vector  list  ]