[R-sig-Geo] Storing List data-types as Raster values
Robert J. Hijmans
r.hijmans at gmail.com
Sat Sep 28 15:51:14 CEST 2013
You can do:
b <- brick(nl=2, ncol=5, nrow=5)
b <- cbind(14,20)
cell numbers are implicit so you do not need to create a layer for these.
On Fri, Sep 27, 2013 at 7:51 AM, shahab <shahab.mokari at gmail.com> wrote:
> Thanks Lionel, Lets see what I can do. A amjor issue is that I need toe
> keep pair of values (id, direction) and maintaining this pair relation
> while spreading them in different layers becomes problematic.
> Again thanks,
> On Fri, Sep 27, 2013 at 2:57 PM, Lionel <s6lihert at uni-bonn.de> wrote:
>> Dear Shahab,
>> Indeed each raster cell should contain an unique value, I guess this is
>> part of the definition of what a raster is. What you could do is put your
>> different variable (id, direction) in different layer of a raster stack.
>> See ?stack for example.
>> On 09/27/2013 02:33 PM, shahab wrote:
>>> I am quite new to Raster library and a bit confused.
>>> Basically I would like to raster an area, and then place information
>>> (Identifuer, Direction) in each cell ,as follows:
>>> Error in min(vals) : invalid 'type' (list) of argument
>>> In addition: Warning message:
>>> In .replace(x, i = i, value = value, recycle = 1) :
>>> number of items to replace is not a multiple of replacement length
>>> It seems to me that I can not put an object of type List,or vector,...in
>>> the cells??
>>> If this is the case, what would be the alternative solutions?
>>> [[alternative HTML version deleted]]
>>> R-sig-Geo mailing list
>>> R-sig-Geo at r-project.org
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
> [[alternative HTML version deleted]]
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
More information about the R-sig-Geo