[R-sig-Geo] Grid of raster: increase resolution

Tom Philippi tephilippi at gmail.com
Tue Mar 20 20:44:15 CET 2012


Also, I believe that the argument to aggregate is FUN= and not fun=,
which appears to be what the error message is referencing.

Tom 2



On Tue, Mar 20, 2012 at 10:15 AM, Robert J. Hijmans <r.hijmans at gmail.com> wrote:
> Komine,
>
> You should have checked what kind of object "test1" is (it is NULL; that is
> what plot returns in this case).  You can do
>
> test2 <- aggregate( myobject , fact=2, fun=mean)
>
> (By the way, for xyz to raster see "rasterFromXYZ" for a regular point
> pattern or "rasterize" for an irregular point pattern)
>
> Robert
>
> On Tue, Mar 20, 2012 at 9:47 AM, Komine <momadou at yahoo.fr> wrote:
>
>> HI,
>> I had in a excel file a data matrix: X Y Z. I created a raster with Arcgis
>> then I opened it with R.
>> I want to increase the resolution of my raster in order to see difference
>> between
>> pixel by their colors. I suppose the pixels that have the same values in
>> the
>> column Z, must have the same color.
>> But When I used my code, I have error message:Erreur in is.function(FUN) :
>> 'FUN' is not found
>>
>> >library(raster)
>> >myobject <-raster("C:\\Users\\Desktop\\Test_R\\Freq1.tif")
>> >test1<-plot(myobject)
>> >test2 <- aggregate(test1, fact=2, fun=mean)
>>
>> Can you help me to resolve it.
>> Thank you in advance
>>
>> --
>> View this message in context:
>> http://r-sig-geo.2731867.n2.nabble.com/Grid-of-raster-increase-resolution-tp7389731p7389731.html
>> Sent from the R-sig-geo mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list