[R] asc class object - how to get positions (coordinates) for a given raster ID?

2009-08-04 Thread Paulo Eduardo Cardoso
In a raster asc object, I'd like to take the positions (x and y coordinates) for a given pixel ID. Any idea about how to do this? ___ Paulo E. Cardoso [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] apply function to named numeric object

2009-08-03 Thread Paulo Eduardo Cardoso
Maybe a very basic question. How can I get mean of a object like this str(object) num [1:53, 1:2] 734 734 736 734 736 ... - attr(*, dimnames)=List of 2 ..$ : NULL ..$ : chr [1:2] x y I want the mean of both x and y ___ Paulo E. Cardoso [[alternative HTML version

Re: [R] apply function to named numeric object

2009-08-03 Thread Paulo Eduardo Cardoso
and that list. Any chance of do it with a single function? 2009/8/3 David Winsemius dwinsem...@comcast.net On Aug 3, 2009, at 9:07 AM, Paulo Eduardo Cardoso wrote: Maybe a very basic question. How can I get mean of a object like this str(object) num [1:53, 1:2] 734 734 736 734 736

Re: [R] apply function to named numeric object

2009-08-03 Thread Paulo Eduardo Cardoso
useful replies from R users. Those two object both appear to be matrices and both should be handled by those functions. 2009/8/3 David Winsemius dwinsem...@comcast.net On Aug 3, 2009, at 9:07 AM, Paulo Eduardo Cardoso wrote: Maybe a very basic question. How can I get mean of a object

Re: [R] apply function to named numeric object

2009-08-03 Thread Paulo Eduardo Cardoso
] x y I hope this help to clarify the objects I'm getting with the loop. 2009/8/3 David Winsemius dwinsem...@comcast.net So you need to show us how you made the second object. (The Posting Guide's phrase reproducible code is hereby invoked.) On Aug 3, 2009, at 10:18 AM, Paulo Eduardo Cardoso

Re: [R] apply function to named numeric object

2009-08-03 Thread Paulo Eduardo Cardoso
for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Paulo Eduardo Cardoso Verzonden: maandag 3 augustus 2009 16:19 Aan

Re: [R] Table to Data-frame

2009-08-03 Thread Paulo Eduardo Cardoso
as.data.frame(table())? 2009/8/3 Olivier Peron olivier.pe...@univ-pau.fr Hello How to pass from table to data-frame ? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide