Last active
January 17, 2021 19:37
-
-
Save Myfanwy/2445f0972f0f6a65d75a0750fdecf779 to your computer and use it in GitHub Desktop.
Preps your system for the things we'll be doing in the training session on Wed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages(c('rmarkdown', | |
'knitr', | |
'lubridate', | |
'ggplot2', | |
'data.table', | |
'readxl', | |
'RSQLite', | |
'dplyr' | |
) | |
) | |
#------------------------------------------------------------------ | |
# function to calculate fish condition - you will copy and paste this to your utils.R script: | |
condition = function(weights, lengths) { | |
if(any(lengths == 0 | weights == 0)) stop("some value(s) are 0") | |
num = 1e5*weights | |
den = lengths^3 | |
K = num/den | |
return(K) | |
} | |
#----------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment