[R-sig-Geo] spacetime EOF error "variable names are limited to 10000 bytes"

Andrew Vitale vitale232 at gmail.com
Tue Oct 14 01:23:34 CEST 2014


Hello,

I have a raster brick of sea level pressure anomalies that I would like to
analyze using empirical orthogonal functions.  Each layer of the brick
represents a daily observation, with a total of 20,718 days worth of
observations (nlayer=20,718).

I can easily coerce the raster brick to a spacetime STFDF object.  However,
when I try to run the spacetime:::EOF function, I get the following error:
"Error in eval(as.call(c(expression(data.frame), x, check.names =
!optional,  :
   variable names are limited to 10000 bytes"

It seems that the error originates from the third line of the EOF code,
where the STFDF is coerced to an xts object.

Does anyone know of a workaround for this error, or is this merely a
limitation of R?

Here's a code that mimics my issue and my sessionInfo():

library(raster)
library(spacetime)

## Create a raster object that mimics my data
## I actually have 20,708 layers in the raster stack
a = array(rnorm(9*9*10000), c(9,9,10000))
b = brick(a)
b = setValues(b, a)
z = seq(as.Date('1980-01-01'), as.Date('2007-05-18'),
        by = 'day')
b = setZ(b, z)

## coerce the raster stack to an STFDF object
stfdf = as(b, 'STFDF')

## attempt to compute EOFs
eof_time = EOF(stfdf, 'temporal')
eof_space = EOF(stfdf, 'space')

#### restultant error:
# Error in eval(as.call(c(expression(data.frame), x, check.names =
!optional,  :
#   variable names are limited to 10000 bytes

# > sessionInfo()
# R version 3.1.1 (2014-07-10)
# Platform: x86_64-pc-linux-gnu (64-bit)

# locale:
#  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
#  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
#  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
#  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
#  [9] LC_ADDRESS=C               LC_TELEPHONE=C
# [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

# attached base packages:
# [1] grid      stats     graphics  grDevices utils     datasets  methods
# [8] base

# other attached packages:
# [1] spacetime_1.1-0 ncdf4_1.13      fields_7.1      maps_2.3-7
# [5] spam_1.0-1      rgdal_0.8-16    raster_2.2-31   sp_1.0-15

# loaded via a namespace (and not attached):
# [1] intervals_0.14.0 lattice_0.20-29  rgeos_0.3-4      tcltk_3.1.1
# [5] tools_3.1.1      xts_0.9-7        zoo_1.7-11




Thanks,
Andrew
-- 
*Andrew P. Vitale*
Masters Student
Department of Geography
University of Nevada, Reno
vitale232 at gmail.com

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list