On Mar 13, 2010, at 10:46 AM, Javier wrote:

> 
> Dear users,
> 
> Is anyone out there on a Saturday to answer this easy question?
> 
> I have the "yo" object data in a "list" format:


It is not a list, it is a matrix.  The dimnames attribute is a list.


>> str(yo)
> num [1:259, 1:173] 16.3 NA NA NA NA ...
> - attr(*, "dimnames")=List of 2
>  ..$ x: chr [1:259] "367319" "367329" "367309" "367339" ...
>  ..$ y: chr [1:173] "780175" "780185" "780195" "780205" ...
>> length(yo)
> [1] 44807
> 
> where x is the name of the rows and y the name of the columns (coordinates)
> of a matrix of 44807 values
> 
> how can I get a data.frame with these three columns: x, y, values
> 
> Many thanks to the Saturday working people.
> 
> Javier                                        

Try:

 as.data.frame.table(yo)

HTH,

Marc Schwartz

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to