Publications by Chang-Chun Chen

20211207 Exercise

07.12.2021

1 In-class 1 Task: Explain what does this statement do: lapply(lapply(search(), ls), length) # the code means apply the length function on the result which apply ls function on the search() # the result provide the number of function in each attached packages ## search(): gives a list of attached packages lapply(lapply(search(), ls), length)...

3937 sym R (25846 sym/125 pcs) 4 img

20211122 exercise

22.11.2021

1 In-class 1 Task: Find out what each code chunk (indicated by ‘##’) in the R script does and provide comments. 1.1 Basic plot extrafont::loadfonts(device = "win") ## basic graphics ## plot without any points plot(women, type='n') ## only plot first row data (58, 115) points(women[1,]) 1.2 Trellis ## lattice graphics ## xyplot(y ~ ...

7933 sym R (19311 sym/56 pcs) 31 img 1 tbl

20211101 In-class

01.11.2021

1 In-class 1 Task: Comment on what each code chunk in the following classroom markdown file is trying to achive and on its output. 1.1 Data # load {WWGbook} packages pacman::p_load(WWGbook) # Loads "classroom" data sets in {WWGbook} packages data(classroom, package="WWGbook") # information related to "classroom" data sets ?classroom The S...

5523 sym R (20278 sym/80 pcs) 2 img 3 tbl

20211025 Homework

29.10.2021

1 Homework 1 Chatterjee and Hadi (Regression by Examples, 2006) provided a link to the right to work data from “Industrial and Labor Relations” set on their web page. Question: Display the relationship between Income and Taxes. The origin: These right-to-work laws have caused a wave of concern throughout the labor movement. A question of in...

3802 sym R (11813 sym/36 pcs) 9 img 5 tbl

20211025 In-class

27.10.2021

1 In-class 1 AAUP Faculty Salary data The AAUP2 data set is a comma-delimited fixed column format text file with ’*’ for missing value. Import the file into R and indicate missing values by ‘NA’. Hint: ?read.csv 1.1 Input data # search the number of gap (blank) dat1 <- readr::fwf_empty("aaup2.dat.txt") dat1 ## $begin ## [1] 0 6 40 ...

1873 sym R (6378 sym/42 pcs) 6 img 2 tbl

20211018 Homework

20.10.2021

1 Homework 1 Concerning the anorexia{MASS}, explain the difference between anorexia[,2] anorexia[“Prewt”] and lm(Postwt ~ Treat, data=anorexia) lm(Postwt ~ as.numeric(Treat), data=anorexia) library(MASS) # str(anorexia) # 擷取anorexia資料中的第2欄位,擷取出來的是vector head(anorexia[,2]) ## [1] 80.7 89.4 91.8 74.0 78...

1759 sym R (8521 sym/60 pcs) 8 img

20211018 In-class

20.10.2021

1 In-class 1 A sample of pupils whose mathematics attainment is tested at the end of Year 2 (seven years old). The coverage of mathematics curriculum each pupil received during Year 2 is measured; so is the mathematics attainment at the beginning of the year. There are 39 pupils in the study. Column 1: Mathematics attainment, end of Year 2 Colu...

3243 sym R (11524 sym/51 pcs) 3 img 1 tbl

20211004 Homework

12.10.2021

xfun::pkg_load2(c("htmltools", "mime")) 1 Homework 1 Weather report 2 Homework 2 Grade school admission 3 Homework 3 3.1 Homework 3-1 RMD Guide Part One Word 3.2 Homework 3-2 xfun::embed_file("homework_3-2.pdf") Download homework_3-2.pdf 4 Homework 4 xfun::embed_file("homework_4.pdf") Download homework_4.pdf 5 Homework 5 5.1 Data Descript...

2135 sym R (6118 sym/35 pcs) 9 img 5 tbl

20211004 In-class

04.10.2021

1 In-class 1 Theme= simplex 範例一:美國婦女的身高和體重 1.1 套內數據 十五位三十到十九歲美國婦女的身高和體重. women height weight 1 58 115 2 59 117 3 60 120 4 61 123 5 62 126 6 63 129 7 64 132 8 65 135 9 66 139 10 67 142...

638 sym R (12602 sym/71 pcs) 13 img

20210927 In-class & Homework

27.09.2021

1 In-class 3 knitr::include_graphics("Inclass3.png") 2 In-class 4 knitr::include_graphics("Inclass4-1.png") knitr::include_graphics("Inclass4-2.png") 3 In-class 5 chem97.R histograms and density plots # histograms and density plots install.packages("mlmRev", repos='https://cloud.r-project.org') ## 將程式套件安載入 'C:/Users/Lightmann/D...

118 sym R (1029 sym/18 pcs) 6 img