hodgesse1 / rfortran

Automatically exported from code.google.com/p/rfortran
0 stars 0 forks source link

R Scripts run of IVF_Beginner tutorial example require additional R packages to be installed #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
*** What steps will reproduce the problem?
1. Install RFortran without the additional R packages
2. Run IVF_Beginner Tutorial Example Solution

*** What is the expected output? What do you see instead?
All tutorial examples run ok, except that two scripts were run that
required additional R paakages, and this caused an error, which may be
annoy/upset some users. The offending scripts are 
Rscripts\mcmcdiagnostics.r (requires coda)
Rscripts\tutorialexamples\TutEx_RFortranLetters_3D_rgl.R (requires rgl)
Rscripts\tutorialexamples\TutEx_AustraliaRainfall_3D.R (requires rgl)

*** What version of RFortran are you using?
v1.0.0(Beta 5)

*** On which Windows operating system?
Windows XP(x64)

*** What Fortran compiler (name and version number) are you using?
NA

*** What version of R are you using?
2.9.1
*** Please provide any additional information below.

Original issue reported on code.google.com by mark.th...@gmail.com on 14 Jul 2009 at 12:38

GoogleCodeExporter commented 8 years ago
What would you like to see done about this? I originally sorted them into 
Beginner
and Advanced folders so that a beginner would be able to start up without any 
issues,
but that an advanced user could easily figure out how to install the necessary 
packages.

I understand the issue but an not sure what you would like to see happen.

Original comment by Michael....@gmail.com on 14 Jul 2009 at 12:59

GoogleCodeExporter commented 8 years ago
Suggestion: Why not display a message that additional packages are required, 
and 
list those packages and maybe instruction on how to get them.
in fact, why not create an RFortran library routine that 
downloads/installs a requested package (naturally, overloaded for 
multipackage requests), and have it as part of the advanced tutorial 
examples?

Response: This is a good idea. In the least we can provide a check and warn the
script may not work as intended and the option to abort or proceed. We can 
maybe also
provide the option to run the download prompt via R so they can get the packages
before proceeding.

It will need an Fortran function RCheckPackages(list). I am just not sure what 
level
of detail to go to. 
1. Hardcoded in Fortran by programmer to match the script: list = (/"coda","rgl 
"/) 
2. Parse the R script to find strings beginning "library(" ,determine the 
packages
and then check that they exist.

Original comment by Michael....@gmail.com on 14 Jul 2009 at 1:16

GoogleCodeExporter commented 8 years ago
Once the package manipulation procedures are in place, this will be easy to fix
automatically.

Even without the parser, I would just have a character parameter array holding 
the
names of the scripts for each tutorial procedure, and get them loaded 
automatically
using RLoadPakagez. Keeping in mind descriptive error messages for people 
working
offline who would be unable to install automatically.

Original comment by dmitri.k...@gmail.com on 14 Jul 2009 at 2:09

GoogleCodeExporter commented 8 years ago
For v2.0.0 and higher, R scripts are now handled quite differently.
Instead of all scripts being auto-loaded in Rinit. They are loaded on an 
as-needs basis 
by each program. If a script requires a package, the error will occur when it 
is used, 
and as R errors are now returned to message log an informative error message 
will be 
provided to the user

Original comment by mark.th...@gmail.com on 19 Feb 2010 at 5:30