[Qgis-user] Problems with R script in sextante

Agustin Diez-Castillo gvsig.mac at gmail.com
Mon Jul 8 05:57:26 PDT 2013


Hi,
I'm trying to reproduce an script published in Rbloggers [1] with no
success so far. Simpliying it do not improve the result. No png seems to be
drawn. The provided raster histogram works.

##layer=raster
##Tools=group
##dens_or_hist=string
##showplots
library('rpanel')
library('rasterVis')
str <- dens_or_hist
if (str !='dens' & str != 'hist'){

rp.messagebox('you must enter "dens" or "hist"', title = 'oops!')
} else {
    im <- stack(layer)

    if (str == 'dens') {

    densityplot(im)
    } else if (str == 'hist') {

    histogram(im)
  }
}

-------------------------------------------------------------------------

##layer=raster
##showplots

library('rasterVis')

densityplot(layer)

Qgis Master b7d7076

*Software*  OS X 10.8.4 (12E55)

R version 2.15.2 (2012-10-26)

Platform: i386-apple-darwin9.8.0/i386 (32-bit)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130708/d6d037ee/attachment.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130708/d6d037ee/attachment-0001.html>


More information about the Qgis-user mailing list