Skip to content

Latest commit

 

History

History
150 lines (96 loc) · 6.53 KB

notes.md

File metadata and controls

150 lines (96 loc) · 6.53 KB
author timestamp
serine
2019.05.13_23:20:48_AEST

20.04.2020

  • start with Git presentation
  • do the first challenge - 5 minutes, how do people organise they directory / projects structure? Best way is to keep everything under a set directory, maybe use google drive to illustrate the point? I should give people some example of the "stuff" that we will be putting into those directories e.g raw-data/fastq_files, references/reference_files, scripts/some_R_scrripts.R supplementary, notes.. most important file of all - which is it? ->> README.md !! name says it all. Other typical files that you could have, perhaps briefly mention https://github.com/bionitio-team/bionitio? , probably not actually, this is for R packages more so.. make my own?

What is Rproj?

What is R project?

RStudio projects make it straightforward to divide your work into multiple contexts, each with their own working directory, workspace, history, and source documents.

Reproducible research in R

RRR

Up front

  • we are going to use rstudio.cloud, everybody with monash google account should be able to sign in. Note that currently this resource is free to use but could become a paid for in the future, but rstudio desktop app will always be free
  • we are not going to learn any of the LaTex thing, but it does exist and you might have use it

Include into RRR course

  • what is R project, .Rproj file and why use it

    • when you open a project it set the working directory
    • if you ever have to run setwd() then this is a perfect case for .Rproj, says Paul, ref
    • .RData is saved inside .Rproj, but you shouldn't use that
  • include git, reproducible

    • git mainly through RStudio. Rstudio has a dialog box that shows nice staging and good diff ing of the commits
  • work towards remote repository becoming your "canonical" location for the project and gives you nice workflow with your supervisor

  • require vs library, Hadley doesn't use require therefore don't

    • when you type a function name without brackets it has at the bottom, <environment: namespace:stats> which is enough to know where that function from. In general good to use :: syntax, but bioconductor doesn't seem to like it.

Looking for a dataset

These are places to look for data sets

keyword that might be useful to start with

  • pathogens
  • microbiology
  • public health
  • epidemiology

resources

todo

  • learning outcome
  • course description

todo

  • explain sections linking via this is todo and all spaces replaced with hiphen (-). this way I can use that in github section (04)
  • In the github intro section don't forget to include "gh-page" enabling. That it is out of the way

Things covered

  • working with images, knitr::include_graphics()
  • code externalization, read_chunk()

Mention

This message came up when I was using R from the terminal

Warning message:
Auto-saved workspace file '.RData' detected. This is bad for reproducible code. You can remove it with unlink(".RData"). To avoid generating '.RData' files, start your session with 'R --no-save'or disable the saving of workspace images in the RStudio IDE settings.

rant

when you are opening rstudio and Rmarkdown file for the first time you'll need to install some packages, that step should be done at the introduction stage

Here I want to rank about Rstudio being shit for git+github workflow, could/should turn this into a blogpost mainly so that other don't spend so much time figuring this out

https://happygitwithr.com/ssh-keys.html

rstudio/rstudio#3805

https://github.com/search?q=org%3Arstudio+rpostback-askpass&type=Code

ropensci/git2r#284 OHI-Science/ohicore#104

https://stackoverflow.com/questions/32699891/rstudio-push-rpostback-askpass-error

Figure options via yaml

This sounds interesting

ok, I've tested out and fig_height and width via yaml do the same thing as when passed through chunk options. I guess yaml allows global defition, although one can set chunk options globally too..

also need to cover out.width = "70%"

pretty good resource about image resizing https://sebastiansauer.github.io/figure_sizing_knitr/

tables Rmarkdown

can't really describe at this stage where this is come from. it appears that it has links with pagedown and paged.js library

  • paged

max.print The number of rows to print. rows.print The number of rows to display. cols.print The number of columns to display. cols.min.print The minimum number of columns to display. pages.print The number of pages to display under page navigation. paged.print When set to FALSE turns off paged tables. rownames.print When set to FALSE turns off row names.

Read this https://harzing.com/blog/2019/05/two-new-kids-on-the-block-crossref-and-dimensions

https://github.com/ropensci/bibtex

https://ropensci.org/technotes/2020/05/07/rmd-citations/#fnref:1

https://zbib.org/