Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
Showing results for 
Search instead for 
Did you mean: 

How do you install R packages?

New Contributor

I've tried this, but it doesn't appear to be working:

When I run the following after that init script, I receive an error.


Error in library(rgdal) : there is no package called ‘rgdal’


New Contributor II

@Christopher Flach​ , Download and install a package (you only need to do this once). To use the package, invoke the library(package) command to load it into the current session.

Contributor III
Contributor III

@Christopher Flach​ , can you paste the trail when you run this in the notebook?

#Start with update
sudo apt-get update
#This installs gdal on the linux machine but not the R library (done in R script)
sudo apt-get install -y gdal-bin libgdal-dev
#To be able to install the R library, you also need libproj-dev 
sudo apt-get install -y libproj-dev 
##### rgeos
sudo apt install libgeos++dev

Community Manager
Community Manager

Hi @Christopher Flach​ , Just a friendly follow-up. Do you still need help or you were able to find the solution? Please let us know.

Not applicable

Hey there @Christopher Flach​ 

Hope all is well!

Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.


Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!