Publications by yuwenchen

0426_R function_Exercise

11.05.2020

Exercise 1 dta <- read.table("hs0.txt", header = T) head(dta) ## id female race ses schtyp prog read write math science socst ## 1 70 male white low public general 57 52 41 47 57 ## 2 121 female white middle public vocation 68 59 53 63 61 ## 3 86 male white high public general 44 33 54 ...

19 sym R (2781 sym/12 pcs) 1 img

0420_Grammar of graphics

23.04.2020

In-class exercise In-class exercise 2 #read data dta2 <- read.table("langMathDutch.txt", header=T) head(dta2) ## school pupil IQV size lang arith ## 1 1 17001 15.0 29 46 24 ## 2 1 17002 14.5 29 45 19 ## 3 1 17003 9.5 29 33 24 ## 4 1 17004 11.0 29 46 26 ## 5 1 17005 8.0 29 20 9 ## ...

294 sym R (11193 sym/60 pcs) 9 img

0413_Exercise_Trellis graphics

20.04.2020

Exercise 1 Use trellis graphics to explore various ways to display the sample data from the National Longitudinal Survey of Youth. dta1 <- read.csv("nlsy86long.csv", header =T, sep=",") head(dta1) ## id sex race time grade year month math read ## 1 2390 Female Majority 1 0 6 67 14.285714 19.047619 ## 2 2560 Femal...

665 sym R (9541 sym/28 pcs) 13 img

0413_InClass_Trellis graphic Exercise

13.04.2020

In-class exercises 1 Render the R script for replicating figures in Chapter 4 of Lattice: Multivariate Data Visualization with R (Sarkar, D. 2008) to html document with comments at each code chunk indicated by ‘##’. ##read the data VADeaths ## Rural Male Rural Female Urban Male Urban Female ## 50-54 11.7 8.7 15.4 ...

1578 sym R (12460 sym/46 pcs) 14 img

0330_Exercise

12.04.2020

0330_Exercise 1 Select at random one school per county in the data set Caschool{Ecdat} and draw a scatter diagram of average math score mathscr against average reading score readscr for the sampled data set. Make sure your results are reproducible (e.g., the same random sample will be drawn each time). #load data dta <- Ecdat::Caschool head(dta) ...

1335 sym R (7160 sym/40 pcs) 3 img

InClass_0330_Q4~6

12.04.2020

InClass Q4 The data set Vocab{car} gives observations on gender, education and vocabulary, from respondents to U.S. General Social Surveys, 1972-2004. Summarize the relationship between education and vocabulary over the years by gender. library(car) ## Loading required package: carData head(Vocab) ## year sex education vocabulary ## 1...

490 sym R (3056 sym/27 pcs)

Exercise_0322_1

29.03.2020

#讀取資料 c_dta <- read.csv("0322_1 data.csv") head(c_dta) ## 座號 系 年 班 開課系序號 學號 姓名 ## 1 教師:U3023 許清芳 上課時間: 一[6-8] 開課號:U3006 U7031 科目:資料管理 ## 2 1 心理系 3 U7031 D840239 蘇 ## 3 2 心...

5 sym R (1242 sym/6 pcs)

Exercise_0322_3

29.03.2020

#第三題(jsp) #因為無法從網頁連結讀取資料,所以先複製到excel再轉成csv jsp<- read.csv("0322_3 data.csv") head(jsp) ## school class sex soc ravens pupil english math year ## 1 S1 C1 G 9 23 P1 72 23 0 ## 2 S1 C1 G 9 23 P1 80 24 1 ## 3 S1 C1 G 9 23 P1...

16 sym R (2621 sym/12 pcs) 1 img

Exercise_0322_2

29.03.2020

#第三題(jsp) #因為無法從網頁連結讀取資料,所以先複製到excel再轉成csv jsp<- read.csv("0322_3 data.csv") head(jsp) ## school class sex soc ravens pupil english math year ## 1 S1 C1 G 9 23 P1 72 23 0 ## 2 S1 C1 G 9 23 P1 80 24 1 ## 3 S1 C1 G 9 23 P1...

16 sym R (2621 sym/12 pcs) 1 img

Exercise_0322_2

29.03.2020

第二題 #先從網路抓取資料 theURL <-"http://www1.aucegypt.edu/faculty/hadi/RABE5/Data5/P005.txt" dta<- read.table(file = theURL, header = T, sep = "\t") head(dta) #看一下前六欄的資料 ## City COL PD URate Pop Taxes Income RTWL ## 1 Atlanta 169 414 13.6 1790128 5128 2961 1 ## 2 Austin 143 239 11...

19 sym R (1121 sym/8 pcs)