require(MASS)
lstsetLanguage(pkgs = c("MASS","stats"),
keywordstyles = paste("\\bfseries\\color{",c("blue","red"),"}",
sep="", collapse=""))
changeKeywordstyles(pkgs = c("distr","distrEx"),
keywordstyles = paste("\\bfseries\\color{",c("green","blue"),"}",
collapse="", sep = ""))
Run the code above in your browser using DataLab