From a bash script would I like to execute these R commands
install.packages('knitr', dependencies = TRUE)
install.packages("xlsx", dependencies="Depends")
install.packages("xtable")
One way would be to put them in a R file, then execute that, but I would prefer not to do that.
Can these commands be executed directly from a Bash script?
Rscript -e "..."(readRscriptman for details) or google forlittler#!/usr/bin/env Rscriptlike you would use#!/bin/bashin an executable shell script.