-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
868f69a
commit a8aedf6
Showing
7 changed files
with
3,818 additions
and
26 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#' get_pred_data | ||
#' | ||
#' @description A fct function | ||
#' | ||
#' @return The return value, if any, from executing the function. | ||
#' | ||
#' @noRd | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#' make_plots | ||
#' | ||
#' @description A fct function | ||
#' | ||
#' @return The return value, if any, from executing the function. | ||
#' | ||
#' @noRd | ||
|
||
|
||
plot_fx<- function(spp, rtype, cov, SAR_year){ | ||
data %>% | ||
filter(year == SAR_year, | ||
species == spp, | ||
rear_type == rtype, | ||
covariate == cov) %>% | ||
ggplot(aes( x= date, color = as.factor(transport), group = year)) + | ||
geom_point(aes(y =SAR, fill = as.factor(transport)))+ | ||
geom_jitter(aes(y =sar.pit, shape = as.factor(transport)), alpha = .7)+ | ||
geom_lineribbon( aes(y = SAR, ymin =SAR.lo, ymax = SAR.hi, fill = as.factor(transport)), alpha = .25) + | ||
labs( x = "Date", y = "SAR", color = NULL, | ||
fill = NULL, shape = NULL, | ||
title = "Predicted SAR versus observed SAR from PIT tag recoveries", | ||
subtitle = paste("Year:",SAR_year)) + | ||
scale_color_manual(breaks = c(0, 1), | ||
values = c("steelblue4", "#b47747"), | ||
labels = c("In-river, \npredicted with 95% CI", "Transported, \npredicted with 95% CI"))+ | ||
scale_fill_manual(breaks = c(0, 1), | ||
values = c("steelblue4", "#b47747"), | ||
labels = c("In-river, \npredicted with 95% CI", "Transported, \npredicted with 95% CI"))+ | ||
scale_shape_manual(values = c(21,21), | ||
breaks = c(0,1), | ||
labels = c("In-river, observed", "Transported, observed")) + | ||
guides(shape = "legend") + | ||
theme_minimal() | ||
|
||
} |
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
Oops, something went wrong.