I am trying to get Solar Radiation data from WorldClim version 2.0 in R, However, I am using the library raster in R but it seems to not be possible to download this data. (since there is only functions for bioclimatic data, Temperature, altitude, and precipitation)
Does anyone know how to download this data from the website using R?
I have specific coordinates. And for my bioclimatic data I have used this code, which worked:
library(raster)
library(sp)
r <- getData("worldclim",var="bio",res=10)
r <- r[[c(1,12)]]
names(r) <- c("Temp","Prec")
lats <- c(48.45435)
lons <- c(-2.04734)
coords <- data.frame(x=lons,y=lats)
points <- SpatialPoints(coords, proj4string = r@crs)
values <- extract(r,points)
df <- cbind.data.frame(coordinates(points),values)
df