Dear list members,

thank you so much for your helpful comments ! I will work through them and 
also explain the purpose of this analysis as suggested by Milton in my 
follow-up.

Best regards,


Juliane
 Dr. Juliane Struve
Environmental Scientist
10, Lynwood Crescent
Sunningdale SL5 0BL
01344 620811 




________________________________
From: milton ruser <milton.ru...@gmail.com>

Cc: R-sig-Geo@stat.math.ethz.ch
Sent: Thursday, 15 January, 2009 0:20:38
Subject: Re: [R-sig-Geo] Reading an Ascii file

Hi Juliane, 

re-reading your email, you told that want a table with x, y and values.
How about you explain a little bit about what you means at the end of your 
analyzis? It will help our community help you.

best wishes,

miltinho
brazil


On Wed, Jan 14, 2009 at 9:18 PM, milton ruser <milton.ru...@gmail.com> wrote:

Dear Juliane, 

It depents what you want with the data.
You can, for example, use import.asc function (adehabitat package; rename your 
file from .txt to .asc), 

or try rgdal package.

Of course, you can also use 
   read.table("myfile.txt", header=F, skip = 6) and deal your data as matrix.

good luck,

miltinho astronauta
brazil 




> wrote:

Dear list,

I am trying to read ArcGIS raster data sets into R after converting them into 
ASCII .txt file. The text file I am trying to read contains

ncols         250
nrows         276
xllcorner     344147.19411119
yllcorner     3024657.6122834
cellsize      0.19970250725746
NODATA_value  -9999

in the first lines followed by a grid of values that are either -9999 or 1.

I have used read.table("myfile.txt") which yields this (first 10 lines).


V1            V2
1          ncols  2.500000e+02
2          nrows  2.760000e+02
3      xllcorner  3.441472e+05
4      yllcorner  3.024658e+06
5       cellsize  1.997025e-01
6      NODATA_value -9.999000e+03
7          -9999 -9.999000e+03
8          -9999 -9.999000e+03
9          -9999 -9.999000e+03
10        -9999 -9.999000e+03

I would like to have the data as a table with coordinates for each cell and the 
actual value.

Could somebody advise me which function I should use ?

Many thanks,

Juliane




_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


      
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to