Skip to content
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

Handbook v2.5 en #410

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open

Handbook v2.5 en #410

wants to merge 49 commits into from

Conversation

nsbatra
Copy link
Contributor

@nsbatra nsbatra commented Oct 14, 2024

Creating the PR to allow easier comparison (e.g. file filter)
I am now reviewing Arran's edits and may edit further as necessary.
Then the plan is to:

  • Merge
  • Change name of repo to epirhandbook
  • Change name of folder away from "new_pages"
  • Make final revision to any URLs in book to account for the above two points
  • Release a new version
  • Cascade changes to other languages based on files changed, not commits.

arranhamlet and others added 30 commits July 25, 2024 09:09
…dated. Should have a discussion on twitter links and non-English learning materials
Copy link

netlify bot commented Oct 14, 2024

Deploy Preview for epirhandbook ready!

Name Link
🔨 Latest commit 4f0d72c
🔍 Latest deploy log https://app.netlify.com/sites/epirhandbook/deploys/67229d7c4b6fbd00081a5239
😎 Deploy Preview https://deploy-preview-410--epirhandbook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 14, 2024

Deploy Preview for erh-quarto ready!

Name Link
🔨 Latest commit 4f0d72c
🔍 Latest deploy log https://app.netlify.com/sites/erh-quarto/deploys/67229d7c291573000875dee2
😎 Deploy Preview https://deploy-preview-410--erh-quarto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 14, 2024

Deploy Preview for euphonious-melomakarona-1c9abb ready!

Name Link
🔨 Latest commit 4f0d72c
🔍 Latest deploy log https://app.netlify.com/sites/euphonious-melomakarona-1c9abb/deploys/67229d7c95ee1200082f1129
😎 Deploy Preview https://deploy-preview-410--euphonious-melomakarona-1c9abb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -364,7 +360,7 @@ age_pyramid(linelist, "age_cat5", "gender")
**A more complex `age_pyramid()` command might include the *optional* arguments to:**

- Show proportions instead of counts (set `proportional = TRUE` when the default is `FALSE`)\
- Specify the two colors to use (`pal =` is short for "palette" and is supplied with a vector of two color names. See the [objects](#objectstructure) page for how the function `c()` makes a vector)
- Specify the two colors to use (`pal =` is short for "palette" and is supplied with a vector of two color names. See the [objects](https://epirhandbook.com/new_pages/basics.html#objects) page for how the function `c()` makes a vector)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arranhamlet is there a reason this link was hard-coded to URL instead of to the page's tag?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this in my update of file paths. Updated now.

@@ -483,7 +480,7 @@ In summary: to use the functions available in an R package, 2 steps must be impl

#### Your library {.unnumbered}

Your "library" is actually a folder on your computer, containing a folder for each package that has been installed. Find out where R is installed in your computer, and look for a folder called "win-library". For example: `R\win-library\4.0` (the 4.0 is the R version - you'll have a different library for each R version you've downloaded).
Your "library" is actually a folder on your computer, containing a folder for each package that has been installed. Find out where R is installed in your computer, and look for a folder called "win-library". For example: `R\win-library\4.4.1` (the 4.4.1 is the R version - you'll have a different library for each R version you've downloaded).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arranhamlet can you check if "win-library" is still relevant and change this if necessary? In my R install now, the folder to the library is "R/R-4.4.1/library"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, the library location has changed.


**Install from Github**

Sometimes, you need to install a package that is not yet available from CRAN. Or perhaps the package is available on CRAN but you want the *development version* with new features not yet offered in the more stable published CRAN version. These are often hosted on the website [github.com](https://github.com/) in a free, public-facing code "repository". Read more about Github in the handbook page on [Version control and collaboration with Git and Github].
Sometimes, you need to install a package that is not yet available from CRAN. Or perhaps the package is available on CRAN but you want the *development version* with new features not yet offered in the more stable published CRAN version. These are often hosted on the website [github.com](https://github.com/) in a free, public-facing code "repository". Read more about Github in the handbook page on [Version control and collaboration with Git and Github](https://epirhandbook.com/new_pages/collaboration.html).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this go directly to the # tag for the page instead of the URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Contributor Author

@nsbatra nsbatra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arranhamlet thanks for all this work.
Let's connect to discuss a few parts, and whether you have time for small corrections or not.


**Install from Github**

Sometimes, you need to install a package that is not yet available from CRAN. Or perhaps the package is available on CRAN but you want the *development version* with new features not yet offered in the more stable published CRAN version. These are often hosted on the website [github.com](https://github.com/) in a free, public-facing code "repository". Read more about Github in the handbook page on [Version control and collaboration with Git and Github].
Sometimes, you need to install a package that is not yet available from CRAN. Or perhaps the package is available on CRAN but you want the *development version* with new features not yet offered in the more stable published CRAN version. These are often hosted on the website [github.com](https://github.com/) in a free, public-facing code "repository". Read more about Github in the handbook page on [Version control and collaboration with Git and Github](https://epirhandbook.com/new_pages/collaboration.html).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -922,7 +932,7 @@ gen_out_table

**Columns**

Columns in a dataset are also objects and can be defined, over-written, and created as described below in the section on Columns.
Columns in a dataset are also objects and can be defined, over-written, and created as described below in the section on [Columns](https://epirhandbook.com/new_pages/basics.html#columnsvariables).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arranhamlet can this also just be the # tag so that if the URL shifts it will still work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or like this: dates as I saw done below. Whatever the proper syntax is for quarto

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

* Detect and locate - `str_detect()`, `str_subset()`, `str_match()`, `str_extract()`
* Modify and replace - `str_sub()`, `str_replace_all()`
7. Regular expressions ("regex")
1. Combine, order, split, arrange - `str_c()`, `str_glue()`, `str_order()`, `str_split()`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arranhamlet flagging these periods for review

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

1) the character vector(s)
2) start position
3) end position
1) the character vector(s).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging these periods for review

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

2) Meta characters
3) Quantifiers
4) Groups
1) Character sets.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging these periods for review as not complete sentences

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated


Quarto provides the flexibility and automation that R Markdown pioneered, with a more powerful underlying flexibility that streamlines a lot of the sharing and publishing processes of your work! While R Markdown is tied to R, Quarto documents allow you to use a number of different programming languages such as R, Python, Javascript and Julia. This means that if you are working with people writing in several different coding languages, they can all use the same document to carry out their analysis.

Even if you are only working in R, Quarto has several advantages. Rather than relying on individual packages to create different outputs, Quarto handles this all internally. To produce a website, PowerPoint slides, or a html report, rather than using external packages, Quarto has this functionality inbuilt. This means you have fewer packages to update, and if one of the packages is no longer maintained, you don't need to change your approach to maintain the same output.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear waht other packages would be involvced in Rmd?
Can't Rmd also use chunks of other programming languages? It's just more clunky?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As is my understanding, R Markdown outputs are generated through a number of different packages (i.e. slides through xaringan (https://bookdown.org/yihui/rmarkdown/xaringan.html), isoslides (https://bookdown.org/yihui/rmarkdown/ioslides-presentation.html), revaljs (https://bookdown.org/yihui/rmarkdown/revealjs.html).

Quarto appears to handle this within itself, https://quarto.org/docs/faq/rmarkdown.html.

I had no idea Rmarkdown could use other languages, but yes it appears it can (https://bookdown.org/yihui/rmarkdown/language-engines.html). I'll update this section to mention this.

knitr::include_graphics(here::here("images", "quarto/5_quarto_report.png"))
```

## Moving beyond simple reports
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What to do about the issues Chris Jarvis raised about objects in the environment not being found, and issues changing the saving location?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is included in the section ### Limitations of Quarto {.unnumbered}

4) Process data
5) Produce outputs (tables, plots, etc.)
6) Save outputs, if applicable (.csv, .png, etc.)
1) Set global **knitr** options.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

periods need to be reviewed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -469,9 +469,16 @@ Now use a column from the above data frame (`facility_order$location_name`) to b
pacman::p_load(forcats)

# create factor and define levels manually
numerical_order <- gsub("Facility ","",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file that was edited seems to be not the current one - see how it is in the "old_bookdown folder. Can you bring the edits over to the actual Qmd?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -671,7 +671,7 @@ you were working on.
*PULL* - First, click the "Pull" icon (downward arrow) which fetches and
pulls at the same time.

*PUSH* - Clicking the green "Pull" icon (upward arrow). You may be asked
*PUSH* - Clicking the green "Push" icon (upward arrow). You may be asked
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file that was edited seems to be not the current one - see how it is in the "old_bookdown folder. Can you bring the edits over to the actual Qmd?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aran can you get rid of these changes in your branch pls as we have removed old_bookdown from this repo

@aspina7
Copy link
Contributor

aspina7 commented Nov 1, 2024

@@ -23,17 +23,17 @@ sample_data <- read.csv(here::here("data","phylo", "sample_data_Shigella_tree.cs


ggtree(tree, layout="circular", branch.length='none') %<+% sample_data + # the %<+% is used to add your dataframe with sample data to the tree
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so ggtree and treeio arent on cran and chuck an error @arranhamlet

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems they need to be installed with {BiocManager} from bioconductor

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I updated the quarto document with this, lines 47-62. Is it still throwing an error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it did for me until i installed separately

@aspina7
Copy link
Contributor

aspina7 commented Nov 6, 2024

@arranhamlet - any chance you could update the data import bit of data_table.qmd to match the other chapters please?
It currently reads in linelist_cleaned.xlsx whereas all others read in linelist_cleaned.rds (with echo=FALSE) and then tell the users to import linelist_cleaned.xlsx (with echo=TRUE).
This will make shifting everything over to using {appliedepidata} much easier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants