Thiago,
You can try using the (perhaps undocumented) 'level' argument
clay3 - brick('/data/input-inland/soita.clay.nc', level=3)
With a RasterBrick you can only one level at a time (i.e. x, y and z, but
not a fourth dimension), but you can create several RasterBricks, one for
each level.
Johannes,
I cannot reproduce this. I get:
library(raster)
Loading required package: sp
raster 2.0-12 (1-September-2012)
f - system.file(external/test.grd, package=raster)
rast - stack(f, f, f)
rast.spdf - as(rast, SpatialPixelsDataFrame)
rast.df - as.data.frame(rast,xy=TRUE,optional=FALSE)
Tamara,
This suggests that 'rasterlayer' was created with an older version of the
raster package; saved to disk and then loaded again while using a newer
version of the package. It is better to use writeRaster/raster in stead of
save/load. You may be able to create a fresh object like this:
r -
Robert,
Thank you very much for the tip. However, I still cannot load all the z
layers in only one brick. Please see the comments below:
library(ncdf)
library(raster)
# Reading file with ncdf package to examine its strucuture.
n - open.ncdf ('~/Dropbox/web/soita.clay.nc')
n
Thiago,
On Sat, Sep 29, 2012 at 9:15 AM, Thiago Veloso thi_vel...@yahoo.com.brwrote:
Robert,
Thank you very much for the tip. However, I still cannot load all the z
layers in only one brick. Please see the comments below:
That is because this file has levels. It has lat/long/depth/time.
Robert,
This lvar=4 argument was the magic word I was looking for! It would be
really useful to include it in the next version of raster manual.
I also thought that this file is odd, and working with netcdf files is really
a Pandora's box. There should have a more specific standard to
Dear list,
After plotting this toy example on Google Earth I would like to add a date/time
stamp to it so that the locations will be shown in sequence using the time
slider. I am not quite sure how to approach this, can I add a date/time to my
spatial points and then submit it to plotKML ?
I'm learning package=raster (more questions to follow!) by RTFM,
notably
http://cran.r-project.org/web/packages/raster/raster.pdf
It's generally good, but has one major (IMHO) problem: in some places
(notably the sections on the constructor functions 'brick' (p31) and
'raster' (p140))