Difference between revisions of "Run GLM demo"

From Age of Water
Jump to: navigation, search
m (Run GLM demo)
(Run GLM demo)
Line 27: Line 27:
  
 
===Run GLM demo===
 
===Run GLM demo===
<code><pre>library(glmtools)
+
<code><pre>library(GLMr)
sim_folder <- system.file('extdata/sim/', package = 'GLMr')
+
demo(glm)</pre></code>
if (run_glm(sim_folder)==0){cat('congratulations on setting up and running GLM!')}else{cat('setup failed, contact jread@usgs.gov with questions')}</pre></code>
+
 
 +
If you get a success message, your task is complete!
 
<!-- Do NOT Edit below this Line -->
 
<!-- Do NOT Edit below this Line -->
 
{{#set:
 
{{#set:

Revision as of 21:54, 20 October 2014


Installing required packages

For windows use use the following command in R: In R, type:

 install.packages("ncdf4",
    repos = "http://gleon.github.com/",
    type = "win.binary") 

then

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


For OSX or Linux use the following command in R:

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

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

Run GLM demo

library(GLMr)
demo(glm)

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

Yandex.Metrica