Skip to content

Instantly share code, notes, and snippets.

View rBatt's full-sized avatar

Ryan Batt rBatt

  • Newell
  • Philadelphia, PA
View GitHub Profile
### Get a list of all your installed packages (so that you can reinstall them after updating R)
a <- installed.packages()
my_pkgs <- dimnames(a)[[1]]
save(my_pkgs, file="my_pkgs.RData")
# exit R, reopen R, then continue to following
load("my_pkgs.RData")
@rBatt
rBatt / LM_mbkkp_test.R
Last active March 27, 2018 17:25 — forked from cbuelo/LM_mbkkp_test.R
LakeMetabolizer meta.bookkeep() example
#Test case for calculating metabolism
library(LakeMetabolizer)
#set up test example where DO starts and ends at same level, is at saturation (= no flux)
DOobs = c(3, 2, 3, 4, 3, 2)
DOsat = c(3, 2, 3, 4, 3, 2)
kGas = c(.2, .2, .2, .2, .2, .2)
zMix = c(1, 1, 1, 1, 1, 1)
irr = c(0, 1, 1, 0, 0, 0)