Extracts point data from a raster file (e.g. a NetCDF file)
extract_nc(df, filn, get_time = FALSE)
A data frame containing columns lon
and lat
specifying longitude and latitude values of points for which data is
to be extracted (points organised by rows).
A character string specifying the path to a raster file that can be read with
raster::brick
or raster::raster
.
A boolean specifying whether to extract time from the raster file.
A data frame of the same number of rows as df
with extracted data
nested in column data
.