How to learn coding

Ben Baumer

About Googling…

Don’t blindly copy and paste code

  • Coding is a form of expression

  • It’s like taking notes

  • Write it yourself from scratch

  • Don’t submit code that you don’t understand

Bad filenames

  • Problems:
    • spaces and special characters in filenames are bad
    • file extensions are important
  • Solutions:
    • use underscores (_) and/or dashes (-)
    • use .Rmd
  • Jenny Bryan on naming things

Ongoing confusion

R session (active)

  • Console pane
  • interactive
  • full benefit of RStudio IDE
  • Environment/History pane
  • Files/Plots/Packages/Help pane

R session (passive)

  • R Markdown pane
  • sequential
  • invisible
  • created when you Knit
  • creates HTML output

When you need to clean up…

  • Broom icon in Environment to sweep away objects

  • Run all chunks above

    • Ctrl + Alt + P
  • Session -> Restart R