I actually do not understand why this function does not just do 'sudo apt-get install "$*"`.  Push the expansion and conversion onto the user. That lets her figure out if package FooBar exists as r-cran-foobar.