Publications by Nicole
20211212_Functions_SCLnt
In-class 1 Explain what does this statement do: lapply(lapply(search(), ls), length) lapply(lapply(search(), ls), length) ## [[1]] ## [1] 0 ## ## [[2]] ## [1] 449 ## ## [[3]] ## [1] 87 ## ## [[4]] ## [1] 113 ## ## [[5]] ## [1] 247 ## ## [[6]] ## [1] 104 ## ## [[7]] ## [1] 203 ## ## [[8]] ## [1] 0 ## ## [[9]] ## [1...
4637 sym R (404489 sym/180 pcs) 12 img
20211129_Grammar of graphics
In-class1 Find out what each code chunk (indicated by ‘##’) in the R script does and provide comments. data(women) ##base系統畫women, 先劃一個空白畫布'n',再畫出第一列的資料點 plot(women, type='n') points(women[1,]) ##lattice系統畫圖,用 xyplot繪製散佈圖,繪製點圖 lattice::xyplot(weight ~ height, ...
10577 sym R (25914 sym/121 pcs) 31 img 12 tbl
20211122_In class_SCL
In class1 how to implement ‘small multiples’ in base graphics given the 4 different diets of the ChickWeight{datasets} example. Adapt the script to produce a plot of 5 panels in which each panel shows a histogram of IQ for each of 5 classes with over 30 pupils in the nlschools{MASS} dataset. dta <- ChickWeight dta_diet <- split(dta, dta$Die...
1829 sym R (19989 sym/85 pcs) 15 img
Homework-Data wrangling
Homework 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). pacman::p_load(Ecdat) data(Caschool, package="Ec...
2876 sym R (22204 sym/130 pcs) 2 img 1 tbl
20211023_SCL_Excise1-5
Excise1 library(MASS) head(anorexia) ## Treat Prewt Postwt ## 1 Cont 80.7 80.2 ## 2 Cont 89.4 80.1 ## 3 Cont 91.8 86.4 ## 4 Cont 74.0 86.3 ## 5 Cont 78.1 76.1 ## 6 Cont 88.3 78.1 str(anorexia) ## 'data.frame': 72 obs. of 3 variables: ## $ Treat : Factor w/ 3 levels "CBT","Cont","FT": 2 2 2 2 2 2 2 2 2 2 ... ...
1195 sym R (10200 sym/109 pcs) 5 img
20211016_SCL_HW5_BAC
5-1 HoRM{datasets} install.packages(“HoRM”) library(HoRM) ## Registered S3 method overwritten by 'quantmod': ## method from ## as.zoo.data.frame zoo HoRM: Supplemental Functions and Datasets for “Handbook of Regression Methods” data(BAC, package="HoRM") dta <- reshape(data.frame(BAC, id=1:15), idvar='id', varying=list(1:...
1114 sym R (6514 sym/35 pcs) 8 img 5 tbl
20211016_SCL_HW5_BAC
5-1 HoRM{datasets} install.packages(“HoRM”) library(HoRM) ## Registered S3 method overwritten by 'quantmod': ## method from ## as.zoo.data.frame zoo HoRM: Supplemental Functions and Datasets for “Handbook of Regression Methods” data(BAC, package="HoRM") dta <- reshape(data.frame(BAC, id=1:15), idvar='id', varying=list(1:...
1092 sym R (6514 sym/35 pcs) 8 img 5 tbl
氣象資訊
天氣預報 【陰天有短暫雨,氣溫偏低,沿海空曠地區可能有強陣風。】 【更新時間:03/05 05:18】 昨天(4日)臺南市中西區最低溫發生在半夜,低溫17.3度,中午高溫26.9度。 今天(5日)大陸冷氣團影響及華南雲雨區東移,臺南地區為陰天且有短暫雨, 清晨低溫約 15度,...
255 sym 1 img 1 tbl
Exercises for merge
Exercises for merge #pacman是一個管理R包的工具,加載之後,採用p_load函數對包進行安裝和加載 p_load(ggplot2, EBImage, jpeg, ggpubr, plotly),以pacman::p_load() 同時取代 install.packages(“A”,“B”) 和 library(A, B) 男生作法 # require(pacman) pacman::p_load(mice) data(potthoffroy) subset(potthoffroy, sex...
824 sym R (7572 sym/43 pcs)
20210928_SCL_W1_Exercises
hist(rnorm(1000)) install.packages("mlmRev", repos='https://cloud.r-project.org') ## 將程式套件安載入 'C:/Users/USER/Documents/R/win-library/4.1' ## (因為 'lib' 沒有被指定) ## package 'mlmRev' successfully unpacked and MD5 sums checked ## ## The downloaded binary packages are in ## C:\Users\USER\AppData\Local\Temp\Rtmp6vywJp...
29 sym R (1263 sym/18 pcs) 6 img