rastr_extract: Extract all values from raster .nc file

Description Usage Arguments Value Examples

View source: R/rastr_extract.R

Description

Extract all values from raster .nc file

Usage

1
rastr_extract(file_path, station_lon, station_lat)

Arguments

file_path

A path to the .nc file you want to extract

station_lon

A number representing the longitude of the location to extract

station_lat

A number representing the latitude of the location to extract

Value

A data table of the extracted values

Examples

1
2
3
4
5
6
7
## Not run: 
pr_filepath <- 'data-raw/EUR_pr_day_CanESM2_historical_rcp85_r25i1p1_19500101-21001231.nc'
stat_lon <- 14 + 24/60 + 59/60/100
stat_lat <- 50 + 05/60 + 11/60/100
pr_sim <- rastr_extract(pr_filepath, stat_lon, stat_lat)

## End(Not run)

veravavan/AdvDeltaChange documentation built on Jan. 18, 2022, 7:05 p.m.