lib_loc requires the path to the packges directory rather than the sparcl directory. Could use location rpkg_dir in the function install_sparcl?