R in QGIS on OSX using Kyngchaos build

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

R in QGIS on OSX using Kyngchaos build

Pieter du Plooy
Hi guys

I would like to use R scripts in  QGIS 2.12 from Kyngchaos and am unable to.

I have installed the R package from r-project, and all  dependencies.

When I run the R scripts that I have downloaded, I get the missing dependency problem.

How do I go about rectifying it?

Regards

Pieter

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

William Kyngesburye
Sorry I didn't reply to your earlier email.

I think it depends on how your scripts interact with R.  I have an R plugin for the GDAL framework.  I also have an R plugin for the GEOS framework, but that's for an old version of R.

You can run R scripts from the Processing plugin, but I don't know how that links R and QGIS data unless it's through GDAL.

There is also rpy2 for using R from python, supposed to be a simple instal with pip, but requires Xcode tools to compile.  I have a package for an old R version, but I could update it.

> On Mar 5, 2016, at 6:28 AM, Pieter du Plooy <[hidden email]> wrote:
>
> Hi guys
>
> I would like to use R scripts in  QGIS 2.12 from Kyngchaos and am unable to.
>
> I have installed the R package from r-project, and all  dependencies.
>
> When I run the R scripts that I have downloaded, I get the missing dependency problem.
>
> How do I go about rectifying it?
>
> Regards
>
> Pieter
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

Pieter du Plooy
Hi William

I was in fact referring to Processing plugin.

I installed rgdal, but that did not make a difference.

Bye the way, if I can be presumptuous, when are you planning to release 2.14?

Pieter

On Sat, Mar 5, 2016 at 6:42 PM, William Kyngesburye <[hidden email]> wrote:
Sorry I didn't reply to your earlier email.

I think it depends on how your scripts interact with R.  I have an R plugin for the GDAL framework.  I also have an R plugin for the GEOS framework, but that's for an old version of R.

You can run R scripts from the Processing plugin, but I don't know how that links R and QGIS data unless it's through GDAL.

There is also rpy2 for using R from python, supposed to be a simple instal with pip, but requires Xcode tools to compile.  I have a package for an old R version, but I could update it.

> On Mar 5, 2016, at 6:28 AM, Pieter du Plooy <[hidden email]> wrote:
>
> Hi guys
>
> I would like to use R scripts in  QGIS 2.12 from Kyngchaos and am unable to.
>
> I have installed the R package from r-project, and all  dependencies.
>
> When I run the R scripts that I have downloaded, I get the missing dependency problem.
>
> How do I go about rectifying it?
>
> Regards
>
> Pieter
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect




_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

William Kyngesburye
I don't know what Processing needs to work with R.

I just posted QGIS 2.14.

> On Mar 5, 2016, at 11:06 AM, Pieter du Plooy <[hidden email]> wrote:
>
> Hi William
>
> I was in fact referring to Processing plugin.
>
> I installed rgdal, but that did not make a difference.
>
> Bye the way, if I can be presumptuous, when are you planning to release 2.14?
>
> Pieter
>
> On Sat, Mar 5, 2016 at 6:42 PM, William Kyngesburye <[hidden email]> wrote:
> Sorry I didn't reply to your earlier email.
>
> I think it depends on how your scripts interact with R.  I have an R plugin for the GDAL framework.  I also have an R plugin for the GEOS framework, but that's for an old version of R.
>
> You can run R scripts from the Processing plugin, but I don't know how that links R and QGIS data unless it's through GDAL.
>
> There is also rpy2 for using R from python, supposed to be a simple instal with pip, but requires Xcode tools to compile.  I have a package for an old R version, but I could update it.
>
> > On Mar 5, 2016, at 6:28 AM, Pieter du Plooy <[hidden email]> wrote:
> >
> > Hi guys
> >
> > I would like to use R scripts in  QGIS 2.12 from Kyngchaos and am unable to.
> >
> > I have installed the R package from r-project, and all  dependencies.
> >
> > When I run the R scripts that I have downloaded, I get the missing dependency problem.
> >
> > How do I go about rectifying it?
> >
> > Regards
> >
> > Pieter
> > _______________________________________________
> > Qgis-user mailing list
> > [hidden email]
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "Time is an illusion - lunchtime doubly so."
>
> - Ford Prefect
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"We can die but once, and that once we must die.  To be always fearing, then, would not avert it, and would make life miserable."

- Tarzan, on death

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

Pieter du Plooy
William

Thank you so very much for your hard work!

Pieter

On Sat, Mar 5, 2016 at 7:55 PM, William Kyngesburye <[hidden email]> wrote:
I don't know what Processing needs to work with R.

I just posted QGIS 2.14.

> On Mar 5, 2016, at 11:06 AM, Pieter du Plooy <[hidden email]> wrote:
>
> Hi William
>
> I was in fact referring to Processing plugin.
>
> I installed rgdal, but that did not make a difference.
>
> Bye the way, if I can be presumptuous, when are you planning to release 2.14?
>
> Pieter
>
> On Sat, Mar 5, 2016 at 6:42 PM, William Kyngesburye <[hidden email]> wrote:
> Sorry I didn't reply to your earlier email.
>
> I think it depends on how your scripts interact with R.  I have an R plugin for the GDAL framework.  I also have an R plugin for the GEOS framework, but that's for an old version of R.
>
> You can run R scripts from the Processing plugin, but I don't know how that links R and QGIS data unless it's through GDAL.
>
> There is also rpy2 for using R from python, supposed to be a simple instal with pip, but requires Xcode tools to compile.  I have a package for an old R version, but I could update it.
>
> > On Mar 5, 2016, at 6:28 AM, Pieter du Plooy <[hidden email]> wrote:
> >
> > Hi guys
> >
> > I would like to use R scripts in  QGIS 2.12 from Kyngchaos and am unable to.
> >
> > I have installed the R package from r-project, and all  dependencies.
> >
> > When I run the R scripts that I have downloaded, I get the missing dependency problem.
> >
> > How do I go about rectifying it?
> >
> > Regards
> >
> > Pieter
> > _______________________________________________
> > Qgis-user mailing list
> > [hidden email]
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "Time is an illusion - lunchtime doubly so."
>
> - Ford Prefect
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"We can die but once, and that once we must die.  To be always fearing, then, would not avert it, and would make life miserable."

- Tarzan, on death



_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

Alex Mandel-2
I've been meaning to play with this too. I assumed it used rpy2 but
maybe that is not the case.

Looking at
https://docs.qgis.org/testing/en/docs/training_manual/processing/r_intro.html
https://docs.qgis.org/2.8/en/docs/user_manual/processing/3rdParty.html

There's nothing about external dependencies other than having R and
configuring the path to the binary.

The pages do however list the author of that module, Matteo Ghetta

I poked into the processing source code:
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/r/RUtils.py

And it looks like it sends R scripts out as R CMD via python's system
call methods, so like calling R on the command-line.

Maybe moving this over to the developer list will get a more formal
response, with better troubleshooting.

Thanks,
Alex

On 03/05/2016 10:09 AM, Pieter du Plooy wrote:

> William
>
> Thank you so very much for your hard work!
>
> Pieter
>
> On Sat, Mar 5, 2016 at 7:55 PM, William Kyngesburye <[hidden email]>
> wrote:
>
>> I don't know what Processing needs to work with R.
>>
>> I just posted QGIS 2.14.
>>
>>> On Mar 5, 2016, at 11:06 AM, Pieter du Plooy <[hidden email]>
>> wrote:
>>>
>>> Hi William
>>>
>>> I was in fact referring to Processing plugin.
>>>
>>> I installed rgdal, but that did not make a difference.
>>>
>>> Bye the way, if I can be presumptuous, when are you planning to release
>> 2.14?
>>>
>>> Pieter
>>>
>>> On Sat, Mar 5, 2016 at 6:42 PM, William Kyngesburye <
>> [hidden email]> wrote:
>>> Sorry I didn't reply to your earlier email.
>>>
>>> I think it depends on how your scripts interact with R.  I have an R
>> plugin for the GDAL framework.  I also have an R plugin for the GEOS
>> framework, but that's for an old version of R.
>>>
>>> You can run R scripts from the Processing plugin, but I don't know how
>> that links R and QGIS data unless it's through GDAL.
>>>
>>> There is also rpy2 for using R from python, supposed to be a simple
>> instal with pip, but requires Xcode tools to compile.  I have a package for
>> an old R version, but I could update it.
>>>
>>>> On Mar 5, 2016, at 6:28 AM, Pieter du Plooy <[hidden email]>
>> wrote:
>>>>
>>>> Hi guys
>>>>
>>>> I would like to use R scripts in  QGIS 2.12 from Kyngchaos and am
>> unable to.
>>>>
>>>> I have installed the R package from r-project, and all  dependencies.
>>>>
>>>> When I run the R scripts that I have downloaded, I get the missing
>> dependency problem.
>>>>
>>>> How do I go about rectifying it?
>>>>
>>>> Regards
>>>>
>>>> Pieter
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> [hidden email]
>>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>> -----
>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>> http://www.kyngchaos.com/
>>>
>>> "Time is an illusion - lunchtime doubly so."
>>>
>>> - Ford Prefect
>>>
>>>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> [hidden email]
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>>
>> "We can die but once, and that once we must die.  To be always fearing,
>> then, would not avert it, and would make life miserable."
>>
>> - Tarzan, on death

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

gene
Processing has nothing to do with rpy2. it uses subprocess  to execute the original R script

The explication is in the /Applications/QGIS.app/Contents/Resources/python/plugins/processing/algs/r/RUtils.py script

1) RUtils first create a temporary file named /Users/.../.qgis2/processing/processing_script.r with the desired R commands (def createRScriptFromRCommands(commands):, line 73)

Example of the content of a processing_script.r file

    options("repos"="http://cran.at.r-project.org/")
    tryCatch(find.package("rgdal"), error=function(e) install.packages("rgdal", dependencies=TRUE))
    tryCatch(find.package("raster"), error=function(e) install.packages("raster", dependencies=TRUE))
    library("raster")
    library("rgdal")
    Layer = readOGR("/Users/Shared/telechargement/04_01_16/valuerelation_testproject",layer="testo2")
    Field="num"
    Summary_statistics<-data.frame(rbind(sum(Layer[[Field]]),
    length(Layer[[Field]]),
    length(unique(Layer[[Field]])),
    min(Layer[[Field]]),
    max(Layer[[Field]]),
    max(Layer[[Field]])-min(Layer[[Field]]),
    mean(Layer[[Field]]),
    median(Layer[[Field]]),sd(Layer[[Field]])),row.names=c("Sum:","Count:","Unique values:","Minimum value:","Maximum value:","Range:","Mean value:","Median value:","Standard deviation:"))
    colnames(Summary_statistics)<-c(Field)
    Summary_statistics

2) it execute the script with subprocess (def executeRAlgorithm:, line 88).

      command = ["R", "CMD","BATCH", "--vanilla",   RUtils.getRScriptFilename(),RUtils.getConsoleOutputFilename()]
      proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True)

3) If you want, you can also use R directly to execute the script

     source("processing_script.r")

Conclusions

a) you need access to R in command line (Terminal.app)

   export R_HOME=/Library/Frameworks/R.framework/Versions/Current/Resources/ in the .bash_profile file

b) you need to install all the R packages independently of QGIS
      install.packages('rgdal')
      install.package('raster')
      .....
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

agustin_mac
Hi,
R doesn’t work on my laptop running capitan [1]

My Rutils.py is in the machine
/Applications/QGIS.app/Contents/Resources/python/plugins/processing/algs/r/Rutils.py

R_Home is in .bash_proflle
export PYTHONPATH="/Applications/QGIS.app/Contents/Resources/python"
#R para Qgis
export R_HOME=/Library/Frameworks/R.framework/Versions/Current/Resources/
/Library/Frameworks/R.framework/Versions/Current/Resources/ #exists

R works typing R in a terminal

To get rid of the message claiming that (This happens when trying to activate R ?)
/Applications/QGIS.app/Contents/msys is not there I cheated creating it

Now I’m able to activate R and download the scripts but an error pop up

 Missing dependency. This algorithm cannot be run :-(

This algorithm requires R to be run. Unfortunately it seems that R is not installed in your system or it is not correctly configured to be used from QGIS

Click here to know more about how to install and configure R to be used with QGIS

No problems in other machines running earlier versions of MacOS

Best
A.
 [1] System Version: OS X 10.11.3 (15D21)  Kernel Version: Darwin 15.3.0



El 6Mar, 2016, a las 9:55 AM, gene <[hidden email]> escribió:

> Processing has nothing to do with rpy2. it uses  subprocess
> <https://docs.python.org/2/library/subprocess.html>   to execute the
> original R script
>
> The explication is in the
> /Applications/QGIS.app/Contents/Resources/python/plugins/processing/algs/r/RUtils.py
> script
>
> 1) RUtils first create a temporary file named
> /Users/.../.qgis2/processing/processing_script.r with the desired R commands
> (def createRScriptFromRCommands(commands):, line 73)
>
> Example of the content of a processing_script.r file
>
>    options("repos"="http://cran.at.r-project.org/")
>    tryCatch(find.package("rgdal"), error=function(e)
> install.packages("rgdal", dependencies=TRUE))
>    tryCatch(find.package("raster"), error=function(e)
> install.packages("raster", dependencies=TRUE))
>    library("raster")
>    library("rgdal")
>    Layer =
> readOGR("/Users/Shared/telechargement/04_01_16/valuerelation_testproject",layer="testo2")
>    Field="num"
>    Summary_statistics<-data.frame(rbind(sum(Layer[[Field]]),
>    length(Layer[[Field]]),
>    length(unique(Layer[[Field]])),
>    min(Layer[[Field]]),
>    max(Layer[[Field]]),
>    max(Layer[[Field]])-min(Layer[[Field]]),
>    mean(Layer[[Field]]),
>
> median(Layer[[Field]]),sd(Layer[[Field]])),row.names=c("Sum:","Count:","Unique
> values:","Minimum value:","Maximum value:","Range:","Mean value:","Median
> value:","Standard deviation:"))
>    colnames(Summary_statistics)<-c(Field)
>    Summary_statistics
>
> 2) it execute the script with subprocess (def executeRAlgorithm:, line 88).
>
>      command = ["R", "CMD","BATCH", "--vanilla",  
> RUtils.getRScriptFilename(),RUtils.getConsoleOutputFilename()]
>      proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
> stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True)
>
> 3) If you want, you can also use R directly to execute the script
>
>     source("processing_script.r")
>
> Conclusions
>
> a) you need access to R in command line (Terminal.app)
>
>   export R_HOME=/Library/Frameworks/R.framework/Versions/Current/Resources/
> in the .bash_profile file
>
> b) you need to install all the R packages independently of QGIS
>      install.packages('rgdal')
>      install.package('raster')
>      .....
>
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/R-in-QGIS-on-OSX-using-Kyngchaos-build-tp5254567p5254644.html
> Sent from the Quantum GIS - User mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

gene
The test is done in the lines 179-200 in the script Rutils.py.  It consists in running the shell command

command = ['R --version'] with processing

 proc = subprocess.Popen(
            command,
            shell=True,
            stdout=subprocess.PIPE,
            stdin=open(os.devnull),
            stderr=subprocess.STDOUT,
            universal_newlines=True,
        ).stdout
for line in iter(proc.readline, ''):
    if 'R version' in line:
         settings.setValue(R_INSTALLED, True)
         return

The result in my  shell is

$ R --version
WARNING: ignoring environment value of R_HOME
R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
....

Therefore, it is an R problem with El Capitan and not a Kyngchaos build  problem
The problem of El Capitan is that only Apple is allowed to install software under /usr/bin (only /usr/local/bin)  and the R (R, Rscript) executables are in  /usr/bin. This affects also MacTeX and XQuartz (because of the new System Integrity Protection  (SIP))

Therefore, it is an R problem and not a Kyngchaos build  problem ( the problem of R with El Capitan  has been resolved)
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

agustin_mac
Thanks for pointing me in the right direction. Following instructions at the grass for mac wikidot I've disabled [1] the System Integrity Protection feature and later on I’ve linked my R and Rscript at /usr/local/bin to /usr/bin
sudo ln -s /usr/local/bin/R

sudo ln -s /usr/local/bin/Rscript Rscript

Now R is working from Qgis at el Capitan
Merci
PS Maybe is a good idea to put the trick at the Qgis wiki.
 [1] http://grassmac.wikidot.com
On 07 Mar 2016, at 18:43, gene <[hidden email]> wrote:

The test is done in the lines 179-200 in the script Rutils.py.  It consists
in running the shell command

command = ['R --version'] with processing

proc = subprocess.Popen(
           command,
           shell=True,
           stdout=subprocess.PIPE,
           stdin=open(os.devnull),
           stderr=subprocess.STDOUT,
           universal_newlines=True,
       ).stdout
for line in iter(proc.readline, ''):
   if 'R version' in line:
        settings.setValue(R_INSTALLED, True)
        return

The result in my  shell is

$ R --version
WARNING: ignoring environment value of R_HOME
R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
....

Therefore, it is an R problem with El Capitan and not a Kyngchaos build
problem
The problem of El Capitan is that only Apple is allowed to install software
under /usr/bin (only /usr/local/bin)  and the R (R, Rscript) executables are
in  /usr/bin. This affects also MacTeX and XQuartz (because of the new
System Integrity Protection  (SIP)
<https://support.apple.com/en-us/HT204899>  )

Therefore, it is an R problem and not a Kyngchaos build  problem ( the
problem of R with El Capitan  has been resolved)




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/R-in-QGIS-on-OSX-using-Kyngchaos-build-tp5254567p5254940.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: R in QGIS on OSX using Kyngchaos build

Pieter du Plooy
Hi guys

Thanks for all the info on this.

I have reverted my one Mac to Mavericks, as I want to test the Horao plugin on Mac, and Openscenegraph does not play nicely with El Cap and from what I heard also Yosemite.

I'll leave El Cap on my other Mac, and see what this does.

SIP was disabled on this machine for Grass install, but I will do the linking later and also test out your recommendations.

Pieter

On Mon, Mar 7, 2016 at 8:38 PM, Agustin Diez-Castillo <[hidden email]> wrote:
Thanks for pointing me in the right direction. Following instructions at the grass for mac wikidot I've disabled [1] the System Integrity Protection feature and later on I’ve linked my R and Rscript at /usr/local/bin to /usr/bin
sudo ln -s /usr/local/bin/R

sudo ln -s /usr/local/bin/Rscript Rscript

Now R is working from Qgis at el Capitan
Merci
PS Maybe is a good idea to put the trick at the Qgis wiki.
 [1] http://grassmac.wikidot.com

On 07 Mar 2016, at 18:43, gene <[hidden email]> wrote:

The test is done in the lines 179-200 in the script Rutils.py.  It consists
in running the shell command

command = ['R --version'] with processing

proc = subprocess.Popen(
           command,
           shell=True,
           stdout=subprocess.PIPE,
           stdin=open(os.devnull),
           stderr=subprocess.STDOUT,
           universal_newlines=True,
       ).stdout
for line in iter(proc.readline, ''):
   if 'R version' in line:
        settings.setValue(R_INSTALLED, True)
        return

The result in my  shell is

$ R --version
WARNING: ignoring environment value of R_HOME
R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
....

Therefore, it is an R problem with El Capitan and not a Kyngchaos build
problem
The problem of El Capitan is that only Apple is allowed to install software
under /usr/bin (only /usr/local/bin)  and the R (R, Rscript) executables are
in  /usr/bin. This affects also MacTeX and XQuartz (because of the new
System Integrity Protection  (SIP)
<https://support.apple.com/en-us/HT204899>  )

Therefore, it is an R problem and not a Kyngchaos build  problem ( the
problem of R with El Capitan  has been resolved)




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/R-in-QGIS-on-OSX-using-Kyngchaos-build-tp5254567p5254940.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user