? Matthew,
? Thank you very much for the suggestion. You assumed correctly: I wanted to plot an average of the whole raster.
? I managed to plot the data (please see http://img137.imageshack.us/img137/601/screenshotan.png), but it's still precarious. Right now I am tying to improve the plot with ggplot2 package!
? Cheers,
? Thiago.
----- Original Message -----
From: Matt Landis <landis at isciences.com>
To: Thiago Veloso <thi_veloso at yahoo.com.br>
Cc: R-SIG list <r-sig-geo at r-project.org>
Sent: Friday, June 8, 2012 3:45 PM
Subject: Re: [R-sig-Geo] Plot spatial time series
Fixing typos:
tmp.df <- data.frame(date = rep(NA, length(files)), lai = NA)
for ( i in 1:length(files) ){
? ?? f <- files[i]
? cat('Reading file: ', f, '\n')
? ?tmp.df$date[i] <- regmatches(f, regexpr('[0-9]{7}', f))
? ?tmp.df$lai[i] <- mean(getValues(r), na.rm = TRUE)
}