library(mgcv)
library(maps)
# loading the Cosmic-ray soil moisture data
try(load("data/cosmos-processed.RData"), silent= T)
# shorten response variable name
names(all_sites)[names(all_sites) == "COSMOS_VWC"] <- "VWC"
names(all_sites)[names(all_sites) == "LATITUDE"] <- "LAT"
names(all_sites)[names(all_sites) == "LONGITUDE"] <- "LON"
# compute "DAY OF THE YEAR" variable
$doy<- as.numeric(format(all_sites$DATE_TIME, "%j")) all_sites