This file contains hidden or 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
| #!/usr/bin/env Rscript | |
| # | |
| # Pinwheel map of Alaska | |
| # | |
| # Author: John Brandon | |
| library(tidyverse) # For data wrangling and ggplotting | |
| library(sf) # Spatial Features | |
| library(USAboundaries) # One of many sources for U.S. state boundaries | |
| # EPSG:3338 [A standard Coordinate Reference System for Alaska] |
This file contains hidden or 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
| # Testing emojis through R | |
| # For emoji aliases, see: | |
| # http://www.webpagefx.com/tools/emoji-cheat-sheet/ | |
| library(emojifont) # Helper emoji functions | |
| library(twitteR) # Twitter API | |
| library(magrittr) # Pipes %>% in R | |
| # Set up OAuth credentials for a twitteR session ------------------------------- | |
| setup_twitter_oauth(consumer_key = "Your_api_key", |
This file contains hidden or 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
| MANAGEMENT PARAMETERS CASE Cet_0A | |
| Base Case: CV_N = 0.20; R_max = 0.04; surv_freq = 4; cv_m = 0.30 | |
| # Input parameters for PBR Tier system simulations | |
| cseed Y # Y = Yes, then provide a seed (iseed) to the random number generator; N = seed with CPU clock instead | |
| iseed 1234 # User supplied seed for radom number generator, ignored if cseed = N | |
| n_sims 100 # Number of simulated population trajectories | |
| n_stocks 1 # Number of stocks (one or two) | |
| yr_max 100 # Number of years to project over | |
| surv_freq 4 # Interval (yrs) between abundance surveys : Wade (1998) trial 6 |
This file contains hidden or 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
| # Create a custom black and white theme for ggplotting in R | |
| library("ggplot2") | |
| mytheme_bw = theme_bw() + theme(axis.title.x = element_text(size = rel(1.5), vjust = 0.0), | |
| axis.title.y = element_text(size = rel(1.5), vjust = 1.0), | |
| axis.text = element_text(size = rel(1.25), colour = "black"), | |
| plot.title = element_text(size = rel(1.75)), | |
| legend.text = element_text(size = 20), | |
| legend.title = element_text(size = 20), | |
| panel.grid.major = element_line(colour = "lightgray"), | |
| panel.grid.minor.y = element_blank(), |