#0. sample data #1. t.test #0. sample data boxplot(sample_a, sample_b) #1. t.test t.test(sample_a, sample_b) ref : http://www.sthda.com/english/wiki/unpaired-two-samples-t-test-in-r Unpaired Two-Samples T-test in R - Easy Guides - Wiki - STHDA Statistical tools for data analysis and visualization www.sthda.com
반복작업할때 function 기능 사용하면 코드를 간결화 할 수 있음. 기본 function(x, y) { any_command(x, y) } select_col 기능을 생성 select(), mutate(), filter() 세가지 명령을 한번에 함. #10 -5th.1 col2 = c("id","psu","kstrata","wt_itvex","age","sex", "he_crea", "he_uph", "he_unitr", "he_usg", "he_upro", "he_uglu", "he_uket", "he_ubil", "he_ubld", "he_uro") select_col % select(col2) %>% mutate(wt=wt_itvex*1/9.5) %>% select(-wt_itvex) %>% f..
R 특정 function이 생각안날떄 유용한 cheat sheets ref; rstudio.com/resources/cheatsheets/4 RStudio Cheatsheets Open source and enterprise-ready professional software for data science rstudio.com