View source: R/sst_to_points.R
sst_to_points | R Documentation |
SST data extracted to spatial points
sst_to_points( year = "2013", month = "01", day = "01", ts = c("daily", "biweekly", "monthly", "custom"), time.range = NULL, spatd, sst.grad = FALSE, epsg = NULL )
year |
A character string. |
month |
An integer. |
day |
An integer. |
ts |
A character string of either: daily, biweekly, monthly or custom. 'daily' will return SST for the specified date, 'biweekly' will return mean, median and sd of SST for 2 weeks around the specified date (1 week on each side), 'monthly will return mean, median and sd of SST for 4 weeks around the specified date (2 weeks on each side). 'custom' will return mean, median and sd of SST for a custom date range as defined by the "time.range" argument. |
time.range |
(only works with ts='custom') A vector of date-time strings in the form c("YYYYMMDD","YYYYMMDD") where the first element is the start time, and the second element is the finish time. |
spatd |
A spatial points dataframe. |
sst.grad |
A boolean. TRUE will add the spatial gradient of SST |
epsg |
An integer. The EPSG number for the desired projection returned by the function |
A spatial points dataframe with a SST column(s) appended.
spatd <- raster::shapefile("/shapedata.shp") ## Then one of: spatd <- sst_to_points(year="2013",month="01",day="01",ts="daily",spatd=spatd,sst.grad=TRUE,epsg=4326) spatd <- sst_to_points(year="2015",month="01",day="01",ts="biweekly",spatd=spatd,sst.grad=TRUE,epsg=4326) spatd <- sst_to_points(year="2015",month="01",day="01",ts="monthly",spatd=spatd,sst.grad=TRUE,epsg=4326) spatd <- sst_to_points(year="2015",month="01",day="01",ts="custom",time.range=c('20150305','20150318'),spatd=spatd,sst.grad=TRUE,epsg=4326)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.