5  Summary

5.1 What did we learn?

5.1.1 Ditching point-and-click

  • The benefits of using R over point-and-click software for data analysis in biological and biomedical sciences are that:
    • it is open-source,
    • it has a wide and diverse community with a huge number of resources
    • it is relatively easy to learn, and
    • it offers very well suited workflows for doing reproducible and responsible data analysis
  • The tidyverse offers advantages over base R. It offers an intuitive way of coding with functional names and tidy data handling and coding in mind
  • R in the browser offers easy access to R without installing software

5.1.2 Plotting mtcars

  • General R coding and execution of code
  • How to look at data tables: head, tail, glimpse
  • The pipe operator %>% or |>
  • Making factorial data using as.factor
  • the dplyr function select
  • basic ggplot functions using aes aesthetics and geoms such as geom_point
  • adding color and shape and using scale_brewer_manual and scale_shape
  • improving layout; theme_bw, base_size and labs
  • using chatGPT for coding improvements

5.1.3 Plotting Seahorse data

  • Loading data and working with typical Seahorse data
  • Using janitor clean_names
  • Using the dplyr function filter
  • Using the %in% operator
  • Changing the layout of ggplots usine theme elements and arguments.
  • Adding text to ggplot using geom_text and annotate
  • Adding lines to ggplot using geom_vline
  • Nesting pipes in ggplot function for subsetting data
  • Using facet_wrap to make multiple similar plots from one datatable
  • Using the forcats fct_reorder function
  • Changing data formats to numbers using as.double
  • Using the dplyr summarize function
  • Using stat_summary to compute means or medians in ggplots
  • Using geom_smooth to make regression lines

5.2 What we did not learn?

  • Base R functions and how to address data in base R, eg xf$OCR[xf$Group == "Background] and xf$Well[10]
  • Other important tidyverse functions, like pivot_wider, pivot_longer,
  • More complicated functions like the map function from the purrr package
  • Other simple ggplot geoms, like geom_bar, geom_boxplot, geom_density
  • How to save images and plots for using them in other software

5.3 External resources