Hi Pablo,

sorry for a late answer again.
I am not sure what is the cause of slow execution of your code. I would either 
have to look at an example, or you can run it with Rprof(). Then you can see 
the most time consuming functions, although I am not sure how it works with 
JIT. If you send the top 10-15 from summaryRprof(), I might be able to give a 
better answer. 
Working with latlon data will slow down the process a bit, but not much. The 
data will be reprojected every time you call interpolate, which will add up to 
some computation time. Another thing is that the default projection for 
interpolation might not be very good at your location, so you should rather 
reproject before interpolation. 

Of the parameters, only nmax is currently passed from the parameter list to the 
different interpolation functions. 

Hope this helps you a bit further,
Best wishes,
Jon

On 12/06/13, Pablo Alfaro  <palf...@motionsoft.com.uy> wrote:
> 
> 
> 
> 
> 
> Hello Jon, thank you so much, it suppressed the verbose output now, and as 
> you suspected it's not the reason for the slowdown. 
> 
> Do you know of anything I can do to speed up the execution of the code? I'm 
> already using the compiler package for the JIT compiling. My data is 
> lat/long, maybe the great circle distances can take longer than euclidean? I 
> have small grids (24x22 cells) but I have to interpolate 15 years of daily 
> data over them.
> 
> 
> 
> Also, do you know if the nmin, nmax and maxdist parameters are working 
> through the params list as well?
> 
> Best,
> Pablo
> 
> 
> 
> 
> 2013/11/25 Jon Olav Skoien <jon.sko...@jrc.ec.europa.eu 
> <jon.sko...@jrc.ec.europa.eu>>
> 
> 
> 
> > 
> >   
> >     
> >   
> >   
> > 
> >     
> > Hi Pablo,
> > 
> >       
> > 
> >       I guess you refer to the lines which are printed to show the
> >       progress of the cross-validation method used for finding the
> >       optimal idw-parameter?
> > 
> >       I dont think they are slowing down anything, but they are for most
> >       cases not adding much information either. 
> > 
> >       There is now a new version on CRAN where debug.level = 0 (which is
> >       anyway the default) suppresses this output. For debug.level
> >       >=1, the lines will still be printed.
> > 
> >       
> > 
> >       Best wishes,
> > 
> >       Jon
> > 
> > 
> > 
> >       
> > 
> >       On 22-Nov-13 21:09, Pablo Alfaro wrote:
> > 
> >     
> > 
> > 
> >     
> > > 
> > >       
> > > Hi, how are you?
> > > 
> > > I'm currently using createIntamapObject to create an interpolation object
> > > of class 'idw'. The method is working fine but I'm getting a lot of text
> > > output in the console which I suspect is slowing things down.
> > > I tried to remove it by setting the debug.level parameter in the params
> > > list to 0 like this:
> > > 
> > > 
> > > interpolacion <- *createIntamapObject(*observations=observaciones,
> > > formulaString=tendenciaEspacial,
> > > predictionLocations=coordsAInterpolar[sel,],
> > > intCRS=params$proj4StringAInterpolar,
> > > targetCRS=params$proj4StringAInterpolar, class='idw',
> > > *params=list(nclus=nCoresAUsar, nmin=params$nmin, nmax=params$nmax,
> > > maxdist=params$maxdist, debug.level = 0)*,
> > > outputWhat=outputWhat*)*
> > > 
> > > Is this the right way to do it? I can try to make a reproducible example 
> > > if
> > > it's needed.
> > > Thanks in advance!
> > > Pablo
> > > 
> > > Ing. Pablo Alfaro Piñeyro
> > > MotionSoft Consulting S.R.L.
> > > Tel: 095 938 487
> > > 
> > > 
> > > 
> > > 2013/11/19 Mark Payne <markpayneatw...@gmail.com> 
> > > <markpayneatw...@gmail.com>
> > > 
> > > 
> > > 
> > >       
> > > > 
> > > >         
> > > > Hi,
> > > > 
> > > > Consider a situation where I have a spatialpixelsdataframe, m.subset,
> > > > that is a subset of a larger dataframe, m. Due to the large size of my
> > > > dataset, its more efficient for me to work on just this subset, than
> > > > it is to work with the entire data set. Now, the question is, once
> > > > I've finished processing the subset, I want to add it back into the
> > > > original object. But the question is... how?
> > > > 
> > > > In terms of a code example, it might look like:
> > > > 
> > > > library(sp)
> > > > data(meuse.grid)
> > > > coordinates(meuse.grid) <- ~ x + y
> > > > m <- SpatialPixelsDataFrame(meuse.grid,meuse.grid@data)
> > > > m <- m[,"dist"]
> > > > 
> > > > #Split into a subset
> > > > m.subset <- subset(m,m$y > 333000)
> > > > 
> > > > #Do som fancy processing on m.subset e.g.
> > > > m.subset$dist <- m.subset$dist * 10
> > > > 
> > > > Now I want to combine the modified pixels in m.subset back into the
> > > > main object, m. Does anyone have any ideas how this might be done?
> > > > 
> > > > Best wishes,
> > > > 
> > > > Mark
> > > > 
> > > > _______________________________________________
> > > > R-sig-Geo mailing list
> > > > R-sig-Geo@r-project.org <R-sig-Geo@r-project.org>
> > > > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> > > > 
> > > > 
> > > > 
> > > >       
> > > 
> > >       
> > >   [[alternative HTML version deleted]]
> > > 
> > > 
> > > 
> > >       
> > > 
> > >       
> > >       
> > > 
> > >       
> > > _______________________________________________
> > > R-sig-Geo mailing list
> > > R-sig-Geo@r-project.org <R-sig-Geo@r-project.org>
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> > > 
> > > 
> > >     
> > 
> >     
> > 
> >     
> > 
> >     
> > -- 
> > Jon Olav Skøien
> > Joint Research Centre - European Commission
> > Institute for Environment and Sustainability (IES)
> > Land Resource Management Unit
> > 
> > Via Fermi 2749, TP 440,  I-21027 Ispra (VA), ITALY
> > 
> > jon.sko...@jrc.ec.europa.eu <jon.sko...@jrc.ec.europa.eu>
> > Tel:  +39 0332 789205(tel:%2B39%200332%20789205)
> > 
> > Disclaimer: Views expressed in this email are those of the individual and 
> > do not necessarily represent official views of the European Commission. 
> > 
> >   
> > 
> > 
> > 
> 
> 
> 
> -- 
> 
> Ing. Pablo Alfaro Piñeyro
> MotionSoft Consulting S.R.L.
> Tel: 095 938 487
> 
> 
> 
> 
>

        [[alternative HTML version deleted]]

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

Reply via email to