Description Usage Arguments Value Author(s)
View source: R/subsetGridlist.R
Crop a gridlist to an smaller area. Grridlist taken as a file in the form of a table of text (first and second columsn assume to be longitude and latitude repsective) or a data.frame with columns "Lon" and "Lat". The smaller area is anything from which a raster::Extent can be derived.
1 | subsetGridlist(gridlist, area, file.name, header = TRUE, offset = c(0, 0))
|
gridlist |
A character string giving the location of the original gridlist which will be read by read.table and the first two columns will be assumed to be Lon then Lat, _or_ a data.frame wth columns Lon and Lat. |
area |
A raster::Extent or a SpatialExtent object specifying the geograpical sub-domain required |
file.name |
A character string specifying a path to write the new gridlist (can be ignored to write no file) |
header |
Logical, whether or not the original file has a header |
offset |
A two-member numeric vector specifying the longitude-latitude offset from the given coordinates to the gridcell centre, ie. should be c(0.25,0.25) for old LPJ-GUESS gridlists, and c(0.0,0.0) for most other more sensible scenarios |
The new gridlist as a data.frame (is also written to a file if file.name is provided)
Matthew Forrest matthew.forrest@senckenberg.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.