[R-sig-Geo] map algebra with ascii grid

Michal Gallay mgallay01 at Queens-Belfast.AC.UK
Sat Jul 14 09:12:25 CEST 2007


Dear R Users,

could you please advise me on doing map algebra with spatial grids? It's 
the first time I am using spatial objects in R. I have imported an ascii 
grid file and wanted to round the values in it or sum with a value, but it 
gives an error message:

>require(maptools)
>x <- readAsciiGrid(fname="xxxx.asc")
> x+3
Error in x + 3 : non-numeric argument to binary operator 
> round(x,2)
Error in round(x, digits) : Non-numeric argument to mathematical function

Thank you for any suggestions.

Best wishes,

Michal



-- 
Michal Gallay

Postgraduate Research Student
School of Geography, Archaeology and Palaeoecology
Queen's University
Belfast BT7 1NN
Northern Ireland

Tel: +44(0)2890 273929
Fax: +44(0)2890 973212
email: mgallay01 at qub.ac.uk
www: www.qub.ac.uk/geog




More information about the R-sig-Geo mailing list