if (interactive()) {
ini_terraclimate('2018-09-01', '2019-06-30', c('ppt', 'tmin', 'tmax'))
x <- c(-6.716, 35.917, 76.884)
y <- c(33.616, 33.833, 23.111)
a <- get_terraclimate(y, x, '2018-09-01', '2019-06-30', c('ppt', 'tmin', 'tmax'))
a$climate[[1]]
a$biovars[[1]]
b <- get_terraclimate(y, x, '2018-09-01', '2019-06-30', c('ppt', 'tmin', 'tmax'), offline = TRUE)
b$climate[[1]]
b$biovars[[1]]
}
Run the code above in your browser using DataLab