Discussion:
[QGIS-Developer] QGIS Processing "R" Provider -- 3.x beta available
Nyall Dawson
2018-11-15 22:34:36 UTC
Permalink
Hi lists,

Just a quick announcement that the Processing provider for R scripts
in QGIS, which was dropped for QGIS 3.0, is now available as a beta
for QGIS 3.4. It's now published as a standalone plugin which must be
manually installed (together with manual installation of the
underlying R software!).

This is a pre-release beta version only -- the script syntax may
change in the final release, so be warned that you may need to update
scripts as a result. But the good news is that this should be 100%
compatible with Processing R scripts from 2.x, with no change required
to the scripts!

To reflect its beta status, the plugin is currently only available via
manual download from GitHub, and isn't (yet) available via the
standard QGIS plugin repository. To install, download the zip release
from https://github.com/north-road/qgis-processing-r/releases/tag/v0.0.2,
and then install via the Plugins -> Manage and Install Plugins >
Install from ZIP tab. After the plugin is installed you'll need to
enable the provider via the Settings > Options > Processing >
Providers > R > Activate checkbox.

Testing feedback is sought and very welcome -- just file issues on
https://github.com/north-road/qgis-processing-r/issues with a detailed
description of any issues you encounter.

This release was made possible thanks to a funding grant by QGIS.org.

Regards,
Nyall
Alex Mandel
2018-11-15 22:49:25 UTC
Permalink
Nyall,

I can confirm the plugin loads without error on QGIS 3.4.1, Ubuntu 16.04
I'll need to find an R script or two to test with.

Thanks this is very appreciated,
Alex
Post by Nyall Dawson
Hi lists,
Just a quick announcement that the Processing provider for R scripts
in QGIS, which was dropped for QGIS 3.0, is now available as a beta
for QGIS 3.4. It's now published as a standalone plugin which must be
manually installed (together with manual installation of the
underlying R software!).
This is a pre-release beta version only -- the script syntax may
change in the final release, so be warned that you may need to update
scripts as a result. But the good news is that this should be 100%
compatible with Processing R scripts from 2.x, with no change required
to the scripts!
To reflect its beta status, the plugin is currently only available via
manual download from GitHub, and isn't (yet) available via the
standard QGIS plugin repository. To install, download the zip release
from https://github.com/north-road/qgis-processing-r/releases/tag/v0.0.2,
and then install via the Plugins -> Manage and Install Plugins >
Install from ZIP tab. After the plugin is installed you'll need to
enable the provider via the Settings > Options > Processing >
Providers > R > Activate checkbox.
Testing feedback is sought and very welcome -- just file issues on
https://github.com/north-road/qgis-processing-r/issues with a detailed
description of any issues you encounter.
This release was made possible thanks to a funding grant by QGIS.org.
Regards,
Nyall
_______________________________________________
QGIS-Developer mailing list
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Tim Sutton
2018-11-16 10:05:38 UTC
Permalink
Hi

Tested here on macOS QGIS 3.4.1 (Williams build) here:

I installed R.app into /Applications

I unpacked the plugin and in settings for processing providers set my R folder like this:

/usr/local/bin/

To test I ran the R-> test processing module but couldn’t actually figure out how to provide it the inputs it needs to run. Can someone share a ‘hello’ world R processing module that I can use to test more completely?

It might be good to add my notes about paths above to your README for the plugin because I first tried to use the R executable in /Applications/R.app/Contents/MacOS but that one won’t work.


Regards

Tim
Post by Alex Mandel
Nyall,
I can confirm the plugin loads without error on QGIS 3.4.1, Ubuntu 16.04
I'll need to find an R script or two to test with.
Thanks this is very appreciated,
Alex
Post by Nyall Dawson
Hi lists,
Just a quick announcement that the Processing provider for R scripts
in QGIS, which was dropped for QGIS 3.0, is now available as a beta
for QGIS 3.4. It's now published as a standalone plugin which must be
manually installed (together with manual installation of the
underlying R software!).
This is a pre-release beta version only -- the script syntax may
change in the final release, so be warned that you may need to update
scripts as a result. But the good news is that this should be 100%
compatible with Processing R scripts from 2.x, with no change required
to the scripts!
To reflect its beta status, the plugin is currently only available via
manual download from GitHub, and isn't (yet) available via the
standard QGIS plugin repository. To install, download the zip release
from https://github.com/north-road/qgis-processing-r/releases/tag/v0.0.2,
and then install via the Plugins -> Manage and Install Plugins >
Install from ZIP tab. After the plugin is installed you'll need to
enable the provider via the Settings > Options > Processing >
Providers > R > Activate checkbox.
Testing feedback is sought and very welcome -- just file issues on
https://github.com/north-road/qgis-processing-r/issues with a detailed
description of any issues you encounter.
This release was made possible thanks to a funding grant by QGIS.org.
Regards,
Nyall
_______________________________________________
QGIS-Developer mailing list
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
—








Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com <http://kartoza.com/> to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux
IRC: timlinux on #qgis at freenode.net
Pedro Venâncio
2018-11-16 10:28:24 UTC
Permalink
Hi Nyall,

Great work!!!

I tried to install it on Windows 10, but I'm always getting this, when
running the test script:

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

I've R 3.5.1 (64bits) installed in my users folder
(C:\Users\username\Documents\R\R-3.5.1), I put this path in R folder
setting, without success. I've already tried to add the R path to
environment variables, but again without success.

R works well with RStudio in same machine.

I'm with QGIS 3.4.1 from OSGeo4W 64bits.

Do you have any hint?

Thank you very much!

Best regards,
Pedro Venâncio
Post by Nyall Dawson
Hi lists,
Just a quick announcement that the Processing provider for R scripts
in QGIS, which was dropped for QGIS 3.0, is now available as a beta
for QGIS 3.4. It's now published as a standalone plugin which must be
manually installed (together with manual installation of the
underlying R software!).
This is a pre-release beta version only -- the script syntax may
change in the final release, so be warned that you may need to update
scripts as a result. But the good news is that this should be 100%
compatible with Processing R scripts from 2.x, with no change required
to the scripts!
To reflect its beta status, the plugin is currently only available via
manual download from GitHub, and isn't (yet) available via the
standard QGIS plugin repository. To install, download the zip release
from https://github.com/north-road/qgis-processing-r/releases/tag/v0.0.2,
and then install via the Plugins -> Manage and Install Plugins >
Install from ZIP tab. After the plugin is installed you'll need to
enable the provider via the Settings > Options > Processing >
Providers > R > Activate checkbox.
Testing feedback is sought and very welcome -- just file issues on
https://github.com/north-road/qgis-processing-r/issues with a detailed
description of any issues you encounter.
This release was made possible thanks to a funding grant by QGIS.org.
Regards,
Nyall
_______________________________________________
QGIS-Developer mailing list
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Nyall Dawson
2018-11-16 10:29:16 UTC
Permalink
Post by Pedro Venâncio
Hi Nyall,
Great work!!!
I tried to install it on Windows 10, but I'm always getting this, when
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
I've R 3.5.1 (64bits) installed in my users folder
(C:\Users\username\Documents\R\R-3.5.1), I put this path in R folder
setting, without success. I've already tried to add the R path to
environment variables, but again without success.
R works well with RStudio in same machine.
I'm with QGIS 3.4.1 from OSGeo4W 64bits.
Do you have any hint?
What sub folder is your rscript.exe file in?

Nyall
Post by Pedro Venâncio
Thank you very much!
Best regards,
Pedro Venâncio
Post by Nyall Dawson
Hi lists,
Just a quick announcement that the Processing provider for R scripts
in QGIS, which was dropped for QGIS 3.0, is now available as a beta
for QGIS 3.4. It's now published as a standalone plugin which must be
manually installed (together with manual installation of the
underlying R software!).
This is a pre-release beta version only -- the script syntax may
change in the final release, so be warned that you may need to update
scripts as a result. But the good news is that this should be 100%
compatible with Processing R scripts from 2.x, with no change required
to the scripts!
To reflect its beta status, the plugin is currently only available via
manual download from GitHub, and isn't (yet) available via the
standard QGIS plugin repository. To install, download the zip release
from https://github.com/north-road/qgis-processing-r/releases/tag/v0.0.2,
and then install via the Plugins -> Manage and Install Plugins >
Install from ZIP tab. After the plugin is installed you'll need to
enable the provider via the Settings > Options > Processing >
Providers > R > Activate checkbox.
Testing feedback is sought and very welcome -- just file issues on
https://github.com/north-road/qgis-processing-r/issues with a detailed
description of any issues you encounter.
This release was made possible thanks to a funding grant by QGIS.org.
Regards,
Nyall
_______________________________________________
QGIS-Developer mailing list
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Pedro Venâncio
2018-11-16 10:38:21 UTC
Permalink
Hi Nyall,
Post by Nyall Dawson
What sub folder is your rscript.exe file in?
I have it in two subfolders:

C:\Users\pedro.venancio\Documents\R\R-3.5.1\bin\Rscript.exe

C:\Users\pedro.venancio\Documents\R\R-3.5.1\bin\x64\Rscript.exe
Pedro Venâncio
2018-11-16 12:09:55 UTC
Permalink
Nyall,

Running this on Python Console

import os
from processing.core.ProcessingConfig import ProcessingConfig

R_FOLDER = 'R_FOLDER'

folder = ProcessingConfig.getSetting(R_FOLDER)
os.path.abspath(folder) if folder else ''

bin_folder = folder
executable = 'Rscript'
exec_dir = 'x64'

os.path.join(bin_folder, 'bin', exec_dir, '{}.exe'.format(executable))

I get the correct path to Rscript:

'C:\\Users\\pedro.venancio\\Documents\\R\\R-3.5.1\\bin\\x64\\Rscript.exe'
Post by Pedro Venâncio
Hi Nyall,
Post by Nyall Dawson
What sub folder is your rscript.exe file in?
C:\Users\pedro.venancio\Documents\R\R-3.5.1\bin\Rscript.exe
C:\Users\pedro.venancio\Documents\R\R-3.5.1\bin\x64\Rscript.exe
Nyall Dawson
2018-11-16 12:22:38 UTC
Permalink
Post by Alex Mandel
Nyall,
Running this on Python Console
import os
from processing.core.ProcessingConfig import ProcessingConfig
R_FOLDER = 'R_FOLDER'
folder = ProcessingConfig.getSetting(R_FOLDER)
os.path.abspath(folder) if folder else ''
bin_folder = folder
executable = 'Rscript'
exec_dir = 'x64'
os.path.join(bin_folder, 'bin', exec_dir, '{}.exe'.format(executable))
'C:\\Users\\pedro.venancio\\Documents\\R\\R-3.5.1\\bin\\x64\\Rscript.exe'
Have you got "use 64" checked in the provider options?

Nyall
Post by Alex Mandel
Post by Pedro Venâncio
Hi Nyall,
Post by Nyall Dawson
What sub folder is your rscript.exe file in?
C:\Users\pedro.venancio\Documents\R\R-3.5.1\bin\Rscript.exe
C:\Users\pedro.venancio\Documents\R\R-3.5.1\bin\x64\Rscript.exe
Pedro Venâncio
2018-11-16 12:27:32 UTC
Permalink
Post by Pedro Venâncio
'C:\\Users\\pedro.venancio\\Documents\\R\\R-3.5.1\\bin\\x64\\Rscript.exe'
Have you got "use 64" checked in the provider options?
Yes, I did Nyall.
Nyall Dawson
2018-11-26 02:54:09 UTC
Permalink
Post by Pedro Venâncio
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
I've R 3.5.1 (64bits) installed in my users folder (C:\Users\username\Documents\R\R-3.5.1), I put this path in R folder setting, without success. I've already tried to add the R path to environment variables, but again without success.
R works well with RStudio in same machine.
I'm with QGIS 3.4.1 from OSGeo4W 64bits.
Do you have any hint?
Thanks for reporting this -- it's fixed in version 0.0.3. You can
fetch this here:
https://github.com/north-road/qgis-processing-r/releases/tag/0.0.3

Nyall
Pedro Venâncio
2018-11-26 23:39:50 UTC
Permalink
Awesome Nyall, I confirm, it's fixed now!

Thank you very much!

Pedro
Post by Pedro Venâncio
Post by Pedro Venâncio
I tried to install it on Windows 10, but I'm always getting this, when
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
Post by Pedro Venâncio
Click here to know more about how to install and configure R to be used
with QGIS
Post by Pedro Venâncio
I've R 3.5.1 (64bits) installed in my users folder
(C:\Users\username\Documents\R\R-3.5.1), I put this path in R folder
setting, without success. I've already tried to add the R path to
environment variables, but again without success.
Post by Pedro Venâncio
R works well with RStudio in same machine.
I'm with QGIS 3.4.1 from OSGeo4W 64bits.
Do you have any hint?
Thanks for reporting this -- it's fixed in version 0.0.3. You can
https://github.com/north-road/qgis-processing-r/releases/tag/0.0.3
Nyall
Loading...