[Qgis-developer] SEXTANTE: R output?
Victor Olaya
volayaf at gmail.com
Fri Jul 12 06:09:04 PDT 2013
Ok, fine then. Only in the canonical libpath. :-)
>I think it is (quite) easily possible to remove the need of R knowledge for a lot of situations, one of these it the installation and update of packages. It is much easier to share a Rscript (rsx) to another system if not installed packages are added automatically.
I agree with that, but what I mean is that the person that writes the
script should take care of all the installation/checking/etc code. He
should put all that sanity code in his plugin, not expect SEXTANTE to
do it, because that makes things less fllexible, and it seems that we
cannot come to a good solution on that. That's what I meant. Of course
I like the idea of sharing scripts :-)
Cheers
2013/7/12 Matteo Mattiuzzi <matteo at mattiuzzi.com>:
> Hi Victor,
> Having a separated libloc causes also a maintenance problem, as the libs in
> there can only be updated (with ease) by SEXTANTE, that does not (?) update
> them. I also think that it is better to have everything on system level but
> there are also environments where a user has no writing privileges outside
> its user space and a user libloc is required (this does R by default in such
> a case, but it asks the user to create that dir if it doesn't already exits,
> and R re-connects to that user libloc every time it starts with the same
> user).
>
> So except for the problem (esily to solve) of permissions and user libloc I
> would stay within R defaults.
>
> I think that SEXTANTE offers a good place to share scripts, _especially_ for
> non R experts (like the example scripts). I.e. I create an R-script that my
> colleagues can use without knowing R. I think this is one of the great
> things of SEXTANTE!
>
> I think it is (quite) easily possible to remove the need of R knowledge for
> a lot of situations, one of these it the installation and update of
> packages. It is much easier to share a Rscript (rsx) to another system if
> not installed packages are added automatically.
>
> It could be interesting to have also a online repository of RSX scripts,
> isn't every R-script is a bit like a plugin!?
>
> Cheers, Matteo
>
>
>
>
>
>
>
>
>
>
> 2013/7/12 Victor Olaya <volayaf at gmail.com>
>>
>> Matteo
>>
>> Thanks for your help
>>
>> After some thinking and discussion, I think that the best and easiest
>> solutions is just to have a separate SEXTANTE environment, with its
>> own libPath. This is the current configuration, but it was not
>> correctly set, so libs were installed tere, but not used from there
>> later. With Donovan's solution, this wil be easy to fix.
>>
>> The R connector in SXTANTE is supposed to be used by people that can
>> use R and write R scripts, so I guess we can let them add the
>> necessary install commands for their scripts. SEXTANTE will just take
>> care of rgdal, since that is used very often.
>>
>> What I will try to do is:
>> - document this in detail in the manual
>> - improve the error handling, so if the R script cannot be run due to
>> a missing dependency, SEXTANTE will inform the user. For this, your
>> scripts might be useful.
>>
>> I want to treat the R scripts much in the same way as the Python
>> scripts. If you need a lib (other that the ones installed with QGIS),
>> you have to install it yourself, modify the PYTHONPATH add the import
>> sentences, etc...and I assume that you know Python well enough to take
>> care of that. The same goes with R scripts. By having a separate R
>> environment, I guess this is easier and also it will not interfere in
>> the "normal" usage of R outside SEXTANTE. And we also get rid of the
>> problem of not having priviledges to install new packages, since all
>> goes to the home folder.
>>
>> What do you think of this?
>>
>> Thanks again!
>> Victor
>>
>>
>>
>> 2013/7/12 Matteo Mattiuzzi <matteo at mattiuzzi.com>:
>> > Hi guys I hope I'm not to late for the lunch,
>> >
>> > I have attached a (mature draft) Rscript that check if all needed
>> > packages
>> > are installed (needed because in the given rscript.rsx there are some
>> > "require(..." or "library(...")
>> > One my Linux it works fine.
>> > Note that it currently doesn't check for SEXTANTE R default packages as
>> > raster/rgdal... but it would be no problem to add them by default.
>> > Currently it installs to the default lib location (so you need to have
>> > write
>> > access (in the R promt if the folder does not exist R asks you if you
>> > want
>> > to create a libloc where you have write access, this could be
>> > problematic
>> > and this is probably the reason for the sextante /R lib loc?, if this is
>> > a
>> > problem, I can use the sextante R lib loc).
>> >
>> > Depending on where you save these files the command is:
>> > R CMD BATCH "--args ~/exampleScriptNotOk.rsx" ~/checkPac.R
>> > R CMD BATCH "--args ~/exampleScriptOk.rsx" ~/checkPac.R
>> >
>> > This command should be started on every Rscripr.rsx execution before the
>> > real execution as it tries to make sure thet the packages requirement
>> > are
>> > all ok. If no installation is required it is very fast, here 1/3 of a
>> > sec.
>> > see ceckPac.Rout for the full execution log
>> >
>> > If this method is an option some testing from your side would be great!
>> > This
>> > is only a suggestion, ant it can be easily addapted/changed/enhanced.
>> >
>> > Matteo
>> >
>> >
>> > 2013/7/12 Alister Hood <Alister.Hood at synergine.com>
>> >>
>> >> Hi guys,
>> >> Speaking of R, would it be worth adding some maintenance scripts? e.g.
>> >>
>> >> update.packages(checkBuilt=TRUE)
>> >>
>> >> and even:
>> >>
>> >> if(!require(installr)) {
>> >> install.packages("installr"); require(installr)} #load / install+load
>> >> installr
>> >> updateR()
>> >>
>> >> I'm not much of an R guy - maybe there are other things too.
>> >>
>> >> Regards,
>> >> Alister
>> >> _______________________________________________
>> >> Qgis-developer mailing list
>> >> Qgis-developer at lists.osgeo.org
>> >> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >
>> >
>> >
>> > _______________________________________________
>> > Qgis-developer mailing list
>> > Qgis-developer at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >
>
>
More information about the Qgis-developer
mailing list