26 Dec 2012 13:44
Change class of elements in list
Robin Corrià <rcorria <at> hotmail.com>
2012-12-26 12:44:45 GMT
2012-12-26 12:44:45 GMT
Dear R users, I have a list of objects of type "im" > mylist$sp1 $sp2 $sp3 and I want to convert them to a list of objects of class "SpatialGridDataFrame" This works for a single object of class "im": a <- mylist$sp1 b <- as(a, "SpatialGridDataFrame") Then I want to write each element in the new list as a TIFF file, with the name of the elements in the list. This also works for a single object in package "rgdal": writeGDAL(b, "sp1.TIFF") Many thanks, Robin [[alternative HTML version deleted]]
RSS Feed