Hi @data_scientist3 ,
The "sf" R package depends on several other packages, including "units". The error message you received indicates that the installation of the "units" package had a non-zero exit status, which means the installation failed for some reason.
To install the "sf" package and its dependencies on a Databricks cluster, you can follow these steps:
- Install the "units" package: The "sf" package requires the "units" package, which has system dependencies that need to be installed. You can install the system dependencies by running the following command in a Databricks Notebook:
%r
system("sudo apt-get install libudunits2-dev -y")
Then install the units
Package using the following R command:
%r
install.packages("units")
- Install the "sf" package: Once the "units" package is installed, you can install the "sf" package using the following R command:
%r
install.packages("sf")
These steps should install the "sf" package and its dependencies on your Databricks cluster. If you encounter any further dependencies issues, you can install the necessary packages using the install.packages()
function in R.