Þ e ¶ ø õ - github pages · Ä l Þ û { x 6 { §5 û1 3 û2 4 û3 ¾2 û4 _ n 1 6 • 4 5 _ ¸...
TRANSCRIPT
• 1 x y z x y z
• 2 “testing01.txt”TT1 * header TT1“testing02.csv”
• 3 if-else ifelse switch x0 10 y x 1/2 x 10 20 y x
x 20 30 y 1 30 x 30 y20 30 10 20
• 4 while repeat fori i i 2 i 3i 1
i i 1
课堂测试04Course Wrap-up 30
• : if-else; ifelse;
• : repeat; for; while;
• : read.table(); write.table(); read.csv(); write.csv();
• function();
• apply lapply(); sapply(); vapply(); tapply();
上次课程内容回顾Course Wrap-up
Rmarkdown Knitr
• 1
• 2 R
• 3
• 4 1 9 x 1 yx+y
• 5 RStudio .Rprofile .Rdata .Rhistory
复习:课堂测试01Course Wrap-up
• 1
• 2 R
• 3 rep() x 5 1 3 2 4 3 2 4
• 4 1 mat, 1-20
2 3
• 5 1 names, ”zhang san” ”li si” ”wang wu”,
scores, 70 80 90 levels, ”C””B””A”; 2)
levels 3 exam, names scoes levels; 4
复习:课堂测试02Course Wrap-up
• 1 (1). x 1 2 3 y,”a””b”c”, x y df; (2). dfz 3 2 1 ; (3). data.frame(x = 10,
y = “d”,c=10)) df2, df
• 2 : (1). a_mat, 1 12b_mat, 1 25 2 ; (2). a_mat b_mat; (3). a_mat
• 3 : (1). str, I’m Shouting str ; (2). str 3 ; (3). str strs 4paste strs c(1,2) ”-”
• 4 1970-1-1
• 5 50 DA-2017-01 DA-2017-50
• 6 test <- c(20, 9, 6, NA, 99, 88, NA, 46) test4 Mt NA
Mt
复习:课堂测试03Course Wrap-up
• R
• RStudio
• R RStudio
• swirl 30-60
练习-0001
install_course_github("pkussdatanalysis","C1_R_Basis")
Course Wrap-up
• 0001
• Demo
•
•
• 0001
练习-0002Course Wrap-up
• “ Introduction to R” 1 13
• vcd
•• Arthritis
• Arthritis ( )
• Arthritis
•
练习-0003Course Wrap-up
• RIA
•• 8 11 12 R
• A Introduction to R A
• hello world
练习-0004Course Wrap-up
•••
练习-0005Course Wrap-up
练习-0006
install_course_github("pkussdatanalysis","C2_Data_Structure_01")
Course Wrap-up
练习-0007
•• Introduction to R
Course Wrap-up
练习-0008Course Wrap-up
练习-0009
install_course_github("pkussdatanalysis","C3_Data_Structure_02")
Course Wrap-up
练习-0010Course Wrap-up
大作业-0001
• 0001
•
Course Wrap-up
练习-0011
install_course_github("pkussdatanalysis","C4_Grammar_01")install_course_github("pkussdatanalysis","C5_Grammar_02")
Course Wrap-up
练习-0012
2.3 5.4 5.55-6 5-8
Course Wrap-up
http://tryr.codeschool.com/
练习-0013Course Wrap-up
练习-0014Course Wrap-up
• 0015-1
• 0015-2
练习-0015Course Wrap-up
• 48 150 10 0 10
0016_applicant.csv 8
•• 15
• 3 8
练习-0016Course Wrap-up
• 0017_test.txt 6
• class 35 1 35 3
2 “01 02 03”
• number“student_class_number”
•
•• 1 80 2 90
•
练习-0017Course Wrap-up
• 0018_grade.csv
••
0014grade.txt
练习-0018Course Wrap-up
5-60017 0018
0002
练习-0019Course Wrap-up
大作业-0002
• 0002
•
Course Wrap-up