R Functions (G)

Note

This review/summary page provides a list of the R functions used in this chapter. This module is mostly tool-based (Git, GitHub, LaTeX/Overleaf, reference managers), so it relies on relatively few R functions; the table below lists those that appear in the tutorials. Each function is described together with its primary package source and its specific utility.

To learn more about these functions, readers can:

  1. Use R’s Built-in Help System: For each function, access its documentation by prefixing the function name with a question mark in the R console, e.g., ?write.csv. This displays the function’s manual page with descriptions, usage, and examples.

  2. Search Websites: Simply Google, or visit the CRAN website to search for specific function documentation. Websites like Stack Overflow and RStudio Community often have discussions related to R functions.

  3. Tutorials and Online Courses: Platforms like DataCamp, Coursera, and edX offer R courses that cover many functions in depth. Also there are examples of dedicated R tutorial websites that you might find useful. One example is “Introduction to R for health data analysis” by Ehsan Karim, An Hoang and Qu.

  4. Books: There are numerous R programming books, such as “R for Data Science” by Hadley Wickham and “The Art of R Programming” by Norman Matloff.

  5. Workshops and Webinars: Institutions and organizations occasionally offer R programming workshops or webinars.

Whenever in doubt, exploring existing resources can be highly beneficial.

Function_name Package_name Use
use_git_config usethis Sets the Git identity (user name and email) used for commits.
git_sitrep usethis Reports the current Git/GitHub configuration ('situation report') to help verify setup.
create_github_token usethis Opens a browser page to generate a GitHub Personal Access Token (PAT) with recommended scopes.
gitcreds_set gitcreds Stores (or updates) a GitHub Personal Access Token in the system credential store.
install.packages base/utils Installs R packages from CRAN (e.g., `usethis`, `gitcreds`).
library base Loads an installed package so its functions are available in the session.
print base Prints an object to the console; here used to format a `tableone` object for export.
write.csv base/utils Writes a data frame (e.g., a formatted table) to a CSV file for import into table generators.
journals rticles Lists the journal templates available in the `rticles` package.