[R-sig-Geo] Converting Grid to factor list

Ronnie Babigumira rb.glists at gmail.com
Sun Jan 8 22:43:56 CET 2006


Edzer
Many thanks. The grid was created in ArcView and exported as an ascii file. I then read it in R using the read.asciigrid 
function in map tools

Any ideas?

Ronnie

Edzer J. Pebesma wrote:
> Ronnie, you didn't tell us how you created the grid. Is it on of the
> grid classes in package sp? In that case you can address the
> variable in it by it's name, say foo:
> 
> mygrid.f <- factor(mygrid$foo)
> 
> hth,
> -- 
> Edzer
> 
> Ronnie Babigumira wrote:
> 
>> Hi listers
>> I would like to change a grid to a factor list so as to apply Join 
>> Count statistics however when I use
>> mygrid.f <- factor(mygrid)
>>
>> I get an error message " 'x' must be atomic".
>>
>> Looking through the RHelp archives, I have chanced on emails with a 
>> similar problem but no direct answer to this. Is anyone farmiliar with 
>> this and how can I go about it
>>
>>
>> Many thanks
>>
>> Ronnie
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>  
>>
> 
>




More information about the R-sig-Geo mailing list