Humble Suggestions

From a Hardcore R User

Yue Hu

School of Social Sciences
Tsinghua University

Overview

  • General comments
  • Quick tips

Learning from Meow

Inspired by Amanda Gadrow,
Vice President of Quality Assurance and Support at Posit.

Be Lazy

Always try to find an easier way (there always is~)

LLM constantly lies…

Be lazy, but in the right track

## Set up----------------------------------------------
library(rio)
library(here)
library(tidyverse)
set.seed(313)
source("codes.R")

## Analysis--------------------------------------------
df_input <- import(here("data", "relative_address.Rds"))
result_loop <- map(vars, \(x){
  # analyze each x
  })

Keep Trying Things

Despite some results are terrible…

!

!

You’ll finally land on your feet.

Always ask for help

!

  • LLM
  • Search engines
  • Local R Community (us~~)
  • Github issues

Always ask for help…AFTER trying to solve the problem by yourself

!

Search for “GIYF,” (or “JFGI,” “FGI,” “STFW”) before contacting any flesh human being

Keep your claws sharp

  • R-bloggers
  • Package NEWS
  • Twitter
  • Dr. Hu & his friends’ R Workshops

!

Hang out with friends

!

Bask in the sun

!

Summary

  1. Be lazy, but in the right track
  2. Keep trying things
  3. Always ask for help…AFTER trying to solve the problem by yourself
  4. Keep your claws sharp
  5. Hang out with friends
  6. Bask in the sun

Quick Tips

Tips from personal experiences

  1. Using a good style of coding (https://style.tidyverse.org/)

  2. Naming your variables systematically
    (df_aData, tb_someResult, plot_someOutcome, varName_qNum)

  3. Making sure using a project and version control

  4. Using R in your everyday tasks
    (homework, final paper, application, slides, mails…)

Thank you

  sammo3182

  yuehu@tsinghua.edu.cn

  https://sammo3182.github.io/