Difference between revisions of "Run GLM demo"

From Age of Water
Jump to: navigation, search
(Set PropertyValue: Progress = 100)
(Installing required packages)
 
(5 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
For '''windows, OSX, or Linux''' use use the following command in R:
 
For '''windows, OSX, or Linux''' use use the following command in R:
 
<code><pre> install.packages("glmtools",  
 
<code><pre> install.packages("glmtools",  
     repos = c("http://gleon.github.com/", "http://cran.us.r-project.org", "http://usgs-r.github.com/"),
+
     repos = c("http://gleon.github.io/", "http://cran.us.r-project.org"),
 
     dependencies = TRUE,
 
     dependencies = TRUE,
 
     type = "both")</pre></code>
 
     type = "both")</pre></code>
  
 
You now have GLM (<code>GLMr</code>), R tools for GLM (<code>glmtools</code>), NetCDF file handlers (<code>ncdf</code>), and <code>rLakeAnalyzer</code> installed!!
 
You now have GLM (<code>GLMr</code>), R tools for GLM (<code>glmtools</code>), NetCDF file handlers (<code>ncdf</code>), and <code>rLakeAnalyzer</code> installed!!
 +
 +
If you installed glmtools a while ago, it would be best to update it:
 +
<code><pre> update.packages(repos = "http://gleon.github.io/",
 +
    type = "source")</pre></code>
  
 
===Run GLM demo===
 
===Run GLM demo===
Line 19: Line 23:
  
 
===Troubleshooting===
 
===Troubleshooting===
 +
Only supported for OSX 10.9 (Mavericks) and newer.
 +
 +
Package has been updated, so the following should not arise.
 
Mac Users: If you get a 'permission denied error' when running demo(glm), you must change the permission setting on the sim folder in terminal.
 
Mac Users: If you get a 'permission denied error' when running demo(glm), you must change the permission setting on the sim folder in terminal.
 
<br>Example error:
 
<br>Example error:

Latest revision as of 14:16, 26 October 2014


Installing required packages

For windows, OSX, or Linux use use the following command in R:

 install.packages("glmtools", 
    repos = c("http://gleon.github.io/", "http://cran.us.r-project.org"),
    dependencies = TRUE,
    type = "both")

You now have GLM (GLMr), R tools for GLM (glmtools), NetCDF file handlers (ncdf), and rLakeAnalyzer installed!!

If you installed glmtools a while ago, it would be best to update it:

 update.packages(repos = "http://gleon.github.io/",
    type = "source")

Run GLM demo

library(GLMr)
demo(glm)

If you get a success message, your task is complete!

Troubleshooting

Only supported for OSX 10.9 (Mavericks) and newer.

Package has been updated, so the following should not arise. Mac Users: If you get a 'permission denied error' when running demo(glm), you must change the permission setting on the sim folder in terminal.
Example error:

 sh: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/GLMr/extbin/macGLM/bin/glm: Permission denied 

Steps

  • Open TERMINAL
  • Change directory folder to that listed in the error. (copy bold text, and change to match your personal file path)

example: MyLovley-MacBook-Pro:~ user$ cd /Library/Frameworks/R.framework/Versions/3.0/Resources/library/GLMr/extbin/macGLM/bin

    • If you type ls, you should see 10 files, one of which is titled 'glm'
  • Type
 chmod 755 glm 
  • You should now be able to run demo(glm)


Yandex.Metrica