Thank you very much, I tried using install.packages("gbm") and it worked.
My other query is, I would like to use the gbm package and regression trees packages to model and predict land cover change (y) using predictor variables (x) such as distance to road, soil type, elevation, average rainfall and fire frequencies. Do you have any R scripts and suggestions as to how I can succesfully create this model and predict the land cover?
I have never worked with the package, but after a quick google search it looks like there are several vignettes for the package that will likely provide examples on how to use their package. The vignettes can be accessed by navigating to the package in the packages tab in RStudio.
If you have specific questions about code you have tried after working through the examples then you can ask them here then.