[R-sig-Geo] create a raster time series with negative years (years Before Present)
Jackson Rodrigues
j@ck@onmrodr|gue@ @end|ng |rom gm@||@com
Fri Feb 22 15:59:49 CET 2019
Hey guys,
I need some help to set a time serie (ts) to raster stack, however my
raster serie has negative ages (years Before Present (yrBP)).
I have tried several codes and packages unsuccessfully.
If succeed, I would like to apply seasonal and other calculations to my
new raster time serie.
Below are some codes from package rts. I adapted years to negative value
only as a example.
#####
>path <- system.file("external", package="rts") # location of files
>lst <- list.files(path=path,pattern='.asc$',full.names=TRUE)
>lst # list of raster files
>r <- stack(lst) # creating a RasterStack object
>r
>d <- c("-2000-02-01","-2000-03-01","-2000-04-01","-2000-05-01") #
corresponding dates to 4 rasters
>d <- as.Date(d) # or d <- as.POSIXct(d)
Error in charToDate(x) :
character string is not in a standard unambiguous format
>rt <- rts(r,d) # creating a RasterStackTS object
>rt
>plot(rt)
#########
best,
Jackson Rodrigues
--
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list