-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new course for R reproducible environments #26
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some knowledge of renv but have never 'properly used it on an ongoing project...
I've made a few suggestions and typo fixes etc. Looks great and looking forward to sharing it with my team to start using renv!
```{r renv-libraries, echo=FALSE, fig.align='center'} | ||
knitr::include_graphics("images/renv-libraries.png") | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this graphic a bit confusing, I think probably some form of nesting would convey the concept better...
I had a quick go at a nested hex (fun little diversion), see code and images below. If you agree with my point feel free to use the images/code or trash them and make better ones!
Code to produce
library(ggplot2)
library(phsstyles)
# Data frame for a hexagon ----
angle <- seq(0, 2 * pi, length.out = 7) + pi / 6
polygon_df <- data.frame(
angle = angle,
x = cos(angle),
y = sin(angle)
)
# Colours ----
hex_col_1 <- phs_colors("phs-purple")
hex_col_2 <- phs_colors("phs-magenta")
hex_col_3 <- phs_colors("phs-blue")
transparent_white <- "#FFFFFF00"
# Plots with nested hexagons, sequentially dashed.
p_1 <- ggplot(polygon_df) +
geom_polygon(
aes(x = x, y = y),
linetype = "dashed",
fill = transparent_white,
colour = hex_col_1
) +
geom_polygon(
aes(x = x * 2 / 3, y = y * 2 / 3),
fill = transparent_white,
colour = hex_col_2
) +
geom_polygon(
aes(x = x * 1 / 3, y = y * 1 / 3),
fill = transparent_white,
colour = hex_col_3
) +
coord_equal() +
theme_void()
p_2 <- ggplot(polygon_df) +
geom_polygon(
aes(x = x, y = y),
fill = transparent_white,
colour = hex_col_1
) +
geom_polygon(
aes(x = x * 2 / 3, y = y * 2 / 3),
linetype = "dashed",
fill = transparent_white,
colour = hex_col_2
) +
geom_polygon(
aes(x = x * 1 / 3, y = y * 1 / 3),
fill = transparent_white,
colour = hex_col_3
) +
coord_equal() +
theme_void()
p_3 <- ggplot(polygon_df) +
geom_polygon(
aes(x = x, y = y),
fill = transparent_white,
colour = hex_col_1
) +
geom_polygon(
aes(x = x * 2 / 3, y = y * 2 / 3),
fill = transparent_white,
colour = hex_col_2
) +
geom_polygon(
aes(x = x * 1 / 3, y = y * 1 / 3),
linetype = "dashed",
fill = transparent_white,
colour = hex_col_3
) +
coord_equal() +
theme_void()
p_1
p_2
p_3
# Save plots ----
ggsave("outer_hex.png", p_1)
ggsave("middle_hex.png", p_2)
ggsave("inner_hex.png", p_3)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @Moohan - thanks for your review, I've implemented changes based on your suggestions.
The current graphic isn't great, I created it to have something visual but I don't like it either so I'm keen to explore alternatives. While I do like the style of your suggestions, I'm hesitant to show the model as a nested one. I understand where you're coming from but I'm concerned it's misleading from how libraries actually work. I'll have a think...
Co-authored-by: James McMahon <[email protected]>
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
12263772 | Triggered | Generic Password | 51549fd | ReproducibleEnvs.Rmd | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
No description provided.