#first R session using math attainment data set
#input data
#read in a plain text file with variable names and assign a name to it
dta <- read.table("C:/Nicole/Rstudio IDE code/R fundamentals/math_attainment.txt", header = T)
##checking data
#structure of data
str(dta)
## 'data.frame': 39 obs. of 3 variables:
## $ math2: int 28 56 51 13 39 41 30 13 17 32 ...
## $ math1: int 18 22 44 8 20 12 16 5 9 18 ...
## $ cc : num 328 406 387 167 328 ...
#first 6 rows
head(dta)
## math2 math1 cc
## 1 28 18 328.20
## 2 56 22 406.03
## 3 51 44 386.94
## 4 13 8 166.91
## 5 39 20 328.20
## 6 41 12 328.20
#variable mean colMeans()回數據中或矩陣或數組看平均值
colMeans(dta)
## math2 math1 cc
## 28.76923 15.35897 188.83667
#variable sd
apply(dta, 2, sd)
## math2 math1 cc
## 10.720029 7.744224 84.842513
#correlation matrix
cor(dta)
## math2 math1 cc
## math2 1.0000000 0.7443604 0.6570098
## math1 0.7443604 1.0000000 0.5956771
## cc 0.6570098 0.5956771 1.0000000
#specify square plot region par 是有關繪圖相關參數 pty 繪圖區域的形狀,“s”表示生成一個區域,“m”表示生成最大繪圖區域。
par(pty="s")
#scatter plot of math2 by math1 #add grid lines grid() 裡不能單獨運行,會出現錯誤,要跟畫圖的程式一起跑
plot(math2 ~ math1, data=dta, xlim=c(0, 60), ylim=c(0, 60),
xlab="Math score at Year 1", ylab="Math score at Year 2")
grid()
#regress math2 by math1
dta.lm <- lm(math2 ~ math1, data=dta)
#show results
summary(dta.lm)
##
## Call:
## lm(formula = math2 ~ math1, data = dta)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.430 -5.521 -0.369 4.253 20.388
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 12.944 2.607 4.965 1.57e-05 ***
## math1 1.030 0.152 6.780 5.57e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.255 on 37 degrees of freedom
## Multiple R-squared: 0.5541, Adjusted R-squared: 0.542
## F-statistic: 45.97 on 1 and 37 DF, p-value: 5.571e-08
#show anova table
anova(dta.lm)
## Analysis of Variance Table
##
## Response: math2
## Df Sum Sq Mean Sq F value Pr(>F)
## math1 1 2419.6 2419.59 45.973 5.571e-08 ***
## Residuals 37 1947.3 52.63
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#add regression line #add plot title 要指定圖給它,不然還是會有Error in int_abline title要在這裡一起指定
plot(math2 ~ math1, data=dta)
abline(lm(math2 ~ math1, data=dta), lty=2)
title("Mathematics Attainment")
#specify maximum plot region
par(pty="m")
#add a horizontal red dash line
plot(scale(resid(dta.lm)) ~ fitted(dta.lm),
ylim=c(-3.5, 3.5), type="n",
xlab="Fitted values", ylab="Standardized residuals")
text(fitted(dta.lm), scale(resid(dta.lm)), labels=rownames(dta), cex=0.5)
grid()
abline(h=0, lty=2, col="red")
##normality check
qqnorm(scale(resid(dta.lm)))
qqline(scale(resid(dta.lm)))
grid()
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
## 11 68 146
## 12 69 150
## 13 70 154
## 14 71 159
## 15 72 164
str(women)
## 'data.frame': 15 obs. of 2 variables:
## $ height: num 58 59 60 61 62 63 64 65 66 67 ...
## $ weight: num 115 117 120 123 126 129 132 135 139 142 ...
#first 6 rows
head(women)
## height weight
## 1 58 115
## 2 59 117
## 3 60 120
## 4 61 123
## 5 62 126
## 6 63 129
C(…)是將數列或文字排序
c(women)
## $height
## [1] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
##
## $weight
## [1] 115 117 120 123 126 129 132 135 139 142 146 150 154 159 164
as.matrix是轉換矩陣後輸出
c(as.matrix(women))
## [1] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 115 117 120 123
## [20] 126 129 132 135 139 142 146 150 154 159 164
library(MASS)
birthwt
## low age lwt race smoke ptl ht ui ftv bwt
## 85 0 19 182 2 0 0 0 1 0 2523
## 86 0 33 155 3 0 0 0 0 3 2551
## 87 0 20 105 1 1 0 0 0 1 2557
## 88 0 21 108 1 1 0 0 1 2 2594
## 89 0 18 107 1 1 0 0 1 0 2600
## 91 0 21 124 3 0 0 0 0 0 2622
## 92 0 22 118 1 0 0 0 0 1 2637
## 93 0 17 103 3 0 0 0 0 1 2637
## 94 0 29 123 1 1 0 0 0 1 2663
## 95 0 26 113 1 1 0 0 0 0 2665
## 96 0 19 95 3 0 0 0 0 0 2722
## 97 0 19 150 3 0 0 0 0 1 2733
## 98 0 22 95 3 0 0 1 0 0 2751
## 99 0 30 107 3 0 1 0 1 2 2750
## 100 0 18 100 1 1 0 0 0 0 2769
## 101 0 18 100 1 1 0 0 0 0 2769
## 102 0 15 98 2 0 0 0 0 0 2778
## 103 0 25 118 1 1 0 0 0 3 2782
## 104 0 20 120 3 0 0 0 1 0 2807
## 105 0 28 120 1 1 0 0 0 1 2821
## 106 0 32 121 3 0 0 0 0 2 2835
## 107 0 31 100 1 0 0 0 1 3 2835
## 108 0 36 202 1 0 0 0 0 1 2836
## 109 0 28 120 3 0 0 0 0 0 2863
## 111 0 25 120 3 0 0 0 1 2 2877
## 112 0 28 167 1 0 0 0 0 0 2877
## 113 0 17 122 1 1 0 0 0 0 2906
## 114 0 29 150 1 0 0 0 0 2 2920
## 115 0 26 168 2 1 0 0 0 0 2920
## 116 0 17 113 2 0 0 0 0 1 2920
## 117 0 17 113 2 0 0 0 0 1 2920
## 118 0 24 90 1 1 1 0 0 1 2948
## 119 0 35 121 2 1 1 0 0 1 2948
## 120 0 25 155 1 0 0 0 0 1 2977
## 121 0 25 125 2 0 0 0 0 0 2977
## 123 0 29 140 1 1 0 0 0 2 2977
## 124 0 19 138 1 1 0 0 0 2 2977
## 125 0 27 124 1 1 0 0 0 0 2922
## 126 0 31 215 1 1 0 0 0 2 3005
## 127 0 33 109 1 1 0 0 0 1 3033
## 128 0 21 185 2 1 0 0 0 2 3042
## 129 0 19 189 1 0 0 0 0 2 3062
## 130 0 23 130 2 0 0 0 0 1 3062
## 131 0 21 160 1 0 0 0 0 0 3062
## 132 0 18 90 1 1 0 0 1 0 3062
## 133 0 18 90 1 1 0 0 1 0 3062
## 134 0 32 132 1 0 0 0 0 4 3080
## 135 0 19 132 3 0 0 0 0 0 3090
## 136 0 24 115 1 0 0 0 0 2 3090
## 137 0 22 85 3 1 0 0 0 0 3090
## 138 0 22 120 1 0 0 1 0 1 3100
## 139 0 23 128 3 0 0 0 0 0 3104
## 140 0 22 130 1 1 0 0 0 0 3132
## 141 0 30 95 1 1 0 0 0 2 3147
## 142 0 19 115 3 0 0 0 0 0 3175
## 143 0 16 110 3 0 0 0 0 0 3175
## 144 0 21 110 3 1 0 0 1 0 3203
## 145 0 30 153 3 0 0 0 0 0 3203
## 146 0 20 103 3 0 0 0 0 0 3203
## 147 0 17 119 3 0 0 0 0 0 3225
## 148 0 17 119 3 0 0 0 0 0 3225
## 149 0 23 119 3 0 0 0 0 2 3232
## 150 0 24 110 3 0 0 0 0 0 3232
## 151 0 28 140 1 0 0 0 0 0 3234
## 154 0 26 133 3 1 2 0 0 0 3260
## 155 0 20 169 3 0 1 0 1 1 3274
## 156 0 24 115 3 0 0 0 0 2 3274
## 159 0 28 250 3 1 0 0 0 6 3303
## 160 0 20 141 1 0 2 0 1 1 3317
## 161 0 22 158 2 0 1 0 0 2 3317
## 162 0 22 112 1 1 2 0 0 0 3317
## 163 0 31 150 3 1 0 0 0 2 3321
## 164 0 23 115 3 1 0 0 0 1 3331
## 166 0 16 112 2 0 0 0 0 0 3374
## 167 0 16 135 1 1 0 0 0 0 3374
## 168 0 18 229 2 0 0 0 0 0 3402
## 169 0 25 140 1 0 0 0 0 1 3416
## 170 0 32 134 1 1 1 0 0 4 3430
## 172 0 20 121 2 1 0 0 0 0 3444
## 173 0 23 190 1 0 0 0 0 0 3459
## 174 0 22 131 1 0 0 0 0 1 3460
## 175 0 32 170 1 0 0 0 0 0 3473
## 176 0 30 110 3 0 0 0 0 0 3544
## 177 0 20 127 3 0 0 0 0 0 3487
## 179 0 23 123 3 0 0 0 0 0 3544
## 180 0 17 120 3 1 0 0 0 0 3572
## 181 0 19 105 3 0 0 0 0 0 3572
## 182 0 23 130 1 0 0 0 0 0 3586
## 183 0 36 175 1 0 0 0 0 0 3600
## 184 0 22 125 1 0 0 0 0 1 3614
## 185 0 24 133 1 0 0 0 0 0 3614
## 186 0 21 134 3 0 0 0 0 2 3629
## 187 0 19 235 1 1 0 1 0 0 3629
## 188 0 25 95 1 1 3 0 1 0 3637
## 189 0 16 135 1 1 0 0 0 0 3643
## 190 0 29 135 1 0 0 0 0 1 3651
## 191 0 29 154 1 0 0 0 0 1 3651
## 192 0 19 147 1 1 0 0 0 0 3651
## 193 0 19 147 1 1 0 0 0 0 3651
## 195 0 30 137 1 0 0 0 0 1 3699
## 196 0 24 110 1 0 0 0 0 1 3728
## 197 0 19 184 1 1 0 1 0 0 3756
## 199 0 24 110 3 0 1 0 0 0 3770
## 200 0 23 110 1 0 0 0 0 1 3770
## 201 0 20 120 3 0 0 0 0 0 3770
## 202 0 25 241 2 0 0 1 0 0 3790
## 203 0 30 112 1 0 0 0 0 1 3799
## 204 0 22 169 1 0 0 0 0 0 3827
## 205 0 18 120 1 1 0 0 0 2 3856
## 206 0 16 170 2 0 0 0 0 4 3860
## 207 0 32 186 1 0 0 0 0 2 3860
## 208 0 18 120 3 0 0 0 0 1 3884
## 209 0 29 130 1 1 0 0 0 2 3884
## 210 0 33 117 1 0 0 0 1 1 3912
## 211 0 20 170 1 1 0 0 0 0 3940
## 212 0 28 134 3 0 0 0 0 1 3941
## 213 0 14 135 1 0 0 0 0 0 3941
## 214 0 28 130 3 0 0 0 0 0 3969
## 215 0 25 120 1 0 0 0 0 2 3983
## 216 0 16 95 3 0 0 0 0 1 3997
## 217 0 20 158 1 0 0 0 0 1 3997
## 218 0 26 160 3 0 0 0 0 0 4054
## 219 0 21 115 1 0 0 0 0 1 4054
## 220 0 22 129 1 0 0 0 0 0 4111
## 221 0 25 130 1 0 0 0 0 2 4153
## 222 0 31 120 1 0 0 0 0 2 4167
## 223 0 35 170 1 0 1 0 0 1 4174
## 224 0 19 120 1 1 0 0 0 0 4238
## 225 0 24 116 1 0 0 0 0 1 4593
## 226 0 45 123 1 0 0 0 0 1 4990
## 4 1 28 120 3 1 1 0 1 0 709
## 10 1 29 130 1 0 0 0 1 2 1021
## 11 1 34 187 2 1 0 1 0 0 1135
## 13 1 25 105 3 0 1 1 0 0 1330
## 15 1 25 85 3 0 0 0 1 0 1474
## 16 1 27 150 3 0 0 0 0 0 1588
## 17 1 23 97 3 0 0 0 1 1 1588
## 18 1 24 128 2 0 1 0 0 1 1701
## 19 1 24 132 3 0 0 1 0 0 1729
## 20 1 21 165 1 1 0 1 0 1 1790
## 22 1 32 105 1 1 0 0 0 0 1818
## 23 1 19 91 1 1 2 0 1 0 1885
## 24 1 25 115 3 0 0 0 0 0 1893
## 25 1 16 130 3 0 0 0 0 1 1899
## 26 1 25 92 1 1 0 0 0 0 1928
## 27 1 20 150 1 1 0 0 0 2 1928
## 28 1 21 200 2 0 0 0 1 2 1928
## 29 1 24 155 1 1 1 0 0 0 1936
## 30 1 21 103 3 0 0 0 0 0 1970
## 31 1 20 125 3 0 0 0 1 0 2055
## 32 1 25 89 3 0 2 0 0 1 2055
## 33 1 19 102 1 0 0 0 0 2 2082
## 34 1 19 112 1 1 0 0 1 0 2084
## 35 1 26 117 1 1 1 0 0 0 2084
## 36 1 24 138 1 0 0 0 0 0 2100
## 37 1 17 130 3 1 1 0 1 0 2125
## 40 1 20 120 2 1 0 0 0 3 2126
## 42 1 22 130 1 1 1 0 1 1 2187
## 43 1 27 130 2 0 0 0 1 0 2187
## 44 1 20 80 3 1 0 0 1 0 2211
## 45 1 17 110 1 1 0 0 0 0 2225
## 46 1 25 105 3 0 1 0 0 1 2240
## 47 1 20 109 3 0 0 0 0 0 2240
## 49 1 18 148 3 0 0 0 0 0 2282
## 50 1 18 110 2 1 1 0 0 0 2296
## 51 1 20 121 1 1 1 0 1 0 2296
## 52 1 21 100 3 0 1 0 0 4 2301
## 54 1 26 96 3 0 0 0 0 0 2325
## 56 1 31 102 1 1 1 0 0 1 2353
## 57 1 15 110 1 0 0 0 0 0 2353
## 59 1 23 187 2 1 0 0 0 1 2367
## 60 1 20 122 2 1 0 0 0 0 2381
## 61 1 24 105 2 1 0 0 0 0 2381
## 62 1 15 115 3 0 0 0 1 0 2381
## 63 1 23 120 3 0 0 0 0 0 2410
## 65 1 30 142 1 1 1 0 0 0 2410
## 67 1 22 130 1 1 0 0 0 1 2410
## 68 1 17 120 1 1 0 0 0 3 2414
## 69 1 23 110 1 1 1 0 0 0 2424
## 71 1 17 120 2 0 0 0 0 2 2438
## 75 1 26 154 3 0 1 1 0 1 2442
## 76 1 20 105 3 0 0 0 0 3 2450
## 77 1 26 190 1 1 0 0 0 0 2466
## 78 1 14 101 3 1 1 0 0 0 2466
## 79 1 28 95 1 1 0 0 0 2 2466
## 81 1 14 100 3 0 0 0 0 2 2495
## 82 1 23 94 3 1 0 0 0 0 2495
## 83 1 17 142 2 0 0 1 0 0 2495
## 84 1 21 130 1 1 0 1 0 3 2495
dta <-birthwt
str(dta)
## 'data.frame': 189 obs. of 10 variables:
## $ low : int 0 0 0 0 0 0 0 0 0 0 ...
## $ age : int 19 33 20 21 18 21 22 17 29 26 ...
## $ lwt : int 182 155 105 108 107 124 118 103 123 113 ...
## $ race : int 2 3 1 1 1 3 1 3 1 1 ...
## $ smoke: int 0 0 1 1 1 0 0 0 1 1 ...
## $ ptl : int 0 0 0 0 0 0 0 0 0 0 ...
## $ ht : int 0 0 0 0 0 0 0 0 0 0 ...
## $ ui : int 1 0 0 1 1 0 0 0 0 0 ...
## $ ftv : int 0 3 1 2 0 0 1 1 1 0 ...
## $ bwt : int 2523 2551 2557 2594 2600 2622 2637 2637 2663 2665 ...
head(dta)
## low age lwt race smoke ptl ht ui ftv bwt
## 85 0 19 182 2 0 0 0 1 0 2523
## 86 0 33 155 3 0 0 0 0 3 2551
## 87 0 20 105 1 1 0 0 0 1 2557
## 88 0 21 108 1 1 0 0 1 2 2594
## 89 0 18 107 1 1 0 0 1 0 2600
## 91 0 21 124 3 0 0 0 0 0 2622
#Compute the frequency dplyr彙整數據
%>%, 左邊為變項 右邊為要計算的公式
geom_bar(), stat = “identity”長條圖
group_by(factor(race))用lablec後的樣子呈現
geom_text(),hjust(水平對齊)和vjust(垂直對齊)調整標籤的位置
library(dplyr)
##
## 載入套件:'dplyr'
## 下列物件被遮斷自 'package:MASS':
##
## select
## 下列物件被遮斷自 'package:stats':
##
## filter, lag
## 下列物件被遮斷自 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
df <- dta %>%
group_by(race) %>%
summarise(counts = n())
df
## # A tibble: 3 x 2
## race counts
## <int> <int>
## 1 1 96
## 2 2 26
## 3 3 67
ggplot(df, aes(x = race, y = counts)) +
geom_bar(fill = "#0073C2FF", stat = "identity") +
geom_text(aes(label = counts), vjust = -0.3)
#有26個黑人媽媽, 白人96, 其他67
#指定數字意涵後,帶入資料中看出race數字1.2.3實際代表的意思
c("White", "Black", "Other")[dta$race]
## [1] "Black" "Other" "White" "White" "White" "Other" "White" "Other" "White"
## [10] "White" "Other" "Other" "Other" "Other" "White" "White" "Black" "White"
## [19] "Other" "White" "Other" "White" "White" "Other" "Other" "White" "White"
## [28] "White" "Black" "Black" "Black" "White" "Black" "White" "Black" "White"
## [37] "White" "White" "White" "White" "Black" "White" "Black" "White" "White"
## [46] "White" "White" "Other" "White" "Other" "White" "Other" "White" "White"
## [55] "Other" "Other" "Other" "Other" "Other" "Other" "Other" "Other" "Other"
## [64] "White" "Other" "Other" "Other" "Other" "White" "Black" "White" "Other"
## [73] "Other" "Black" "White" "Black" "White" "White" "Black" "White" "White"
## [82] "White" "Other" "Other" "Other" "Other" "Other" "White" "White" "White"
## [91] "White" "Other" "White" "White" "White" "White" "White" "White" "White"
## [100] "White" "White" "White" "Other" "White" "Other" "Black" "White" "White"
## [109] "White" "Black" "White" "Other" "White" "White" "White" "Other" "White"
## [118] "Other" "White" "Other" "White" "Other" "White" "White" "White" "White"
## [127] "White" "White" "White" "White" "Other" "White" "Black" "Other" "Other"
## [136] "Other" "Other" "Black" "Other" "White" "White" "White" "Other" "Other"
## [145] "White" "White" "Black" "White" "Other" "Other" "Other" "White" "White"
## [154] "White" "White" "Other" "Black" "White" "Black" "Other" "White" "Other"
## [163] "Other" "Other" "Black" "White" "Other" "Other" "White" "White" "Black"
## [172] "Black" "Black" "Other" "Other" "White" "White" "White" "White" "Black"
## [181] "Other" "Other" "White" "Other" "White" "Other" "Other" "Black" "White"
不同的department招生情況,共6個部門,可看到性別在Admitted和Rejected的數字
UCBAdmissions
## , , Dept = A
##
## Gender
## Admit Male Female
## Admitted 512 89
## Rejected 313 19
##
## , , Dept = B
##
## Gender
## Admit Male Female
## Admitted 353 17
## Rejected 207 8
##
## , , Dept = C
##
## Gender
## Admit Male Female
## Admitted 120 202
## Rejected 205 391
##
## , , Dept = D
##
## Gender
## Admit Male Female
## Admitted 138 131
## Rejected 279 244
##
## , , Dept = E
##
## Gender
## Admit Male Female
## Admitted 53 94
## Rejected 138 299
##
## , , Dept = F
##
## Gender
## Admit Male Female
## Admitted 22 24
## Rejected 351 317
#男生的招收狀況
UCBAdmissions[,1,]
## Dept
## Admit A B C D E F
## Admitted 512 353 120 138 53 22
## Rejected 313 207 205 279 138 351
女生的招收狀況
UCBAdmissions[,2,]
## Dept
## Admit A B C D E F
## Admitted 89 17 202 131 94 24
## Rejected 19 8 391 244 299 317
#男生第一欄column的招收狀況,也就是男生A部門的招收情形
UCBAdmissions[,1,1]
## Admitted Rejected
## 512 313
女生B部門招收情況
UCBAdmissions[,2,2]
## Admitted Rejected
## 17 8
#第一列row代表 Admitted,男性的招收情況
UCBAdmissions[1,1,]
## A B C D E F
## 512 353 120 138 53 22
第二列row代表Rejected ,男性的招收情況
UCBAdmissions[2,1,]
## A B C D E F
## 313 207 205 279 138 351
第二列為Rejected,女生,第一筆資料,也就是A部門女生被Rejected的數量有多少
UCBAdmissions[2,2,1]
## [1] 19
#總結 UCBAdmissions[row,column,第幾筆資料] UCBAdmissions[招收狀況,性別,2表示第2筆的資料]
ls()查詢 R 環境下的變數 dir() 查詢工作目錄下的檔案跟目錄。 [92]92頁的內容
help(ls)
## starting httpd help server ... done
help(ls("package:MASS")[92])
menarche {MASS} R Documentation Age of Menarche in Warsaw Description Proportions of female children at various ages during adolescence who have reached menarche.
Usage menarche Format This data frame contains the following columns:
Age Average age of the group. (The groups are reasonably age homogeneous.)
Total Total number of children in the group.
Menarche Number who have reached menarche.
Source Milicer, H. and Szczotka, F. (1966) Age at Menarche in Warsaw girls in 1965. Human Biology 38, 199–203.
The data are also given in Aranda-Ordaz, F.J. (1981) On two families of transformations to additivity for binary response data. Biometrika 68, 357–363.
References Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
Examples mprob <- glm(cbind(Menarche, Total - Menarche) ~ Age, binomial(link = probit), data = menarche)
ls("package:MASS")
## [1] "abbey" "accdeaths" "addterm"
## [4] "Aids2" "Animals" "anorexia"
## [7] "area" "as.fractions" "bacteria"
## [10] "bandwidth.nrd" "bcv" "beav1"
## [13] "beav2" "biopsy" "birthwt"
## [16] "Boston" "boxcox" "cabbages"
## [19] "caith" "Cars93" "cats"
## [22] "cement" "chem" "con2tr"
## [25] "contr.sdif" "coop" "corresp"
## [28] "cov.mcd" "cov.mve" "cov.rob"
## [31] "cov.trob" "cpus" "crabs"
## [34] "Cushings" "DDT" "deaths"
## [37] "denumerate" "dose.p" "drivers"
## [40] "dropterm" "eagles" "enlist"
## [43] "epil" "eqscplot" "farms"
## [46] "fbeta" "fgl" "fitdistr"
## [49] "forbes" "fractions" "frequency.polygon"
## [52] "GAGurine" "galaxies" "gamma.dispersion"
## [55] "gamma.shape" "gehan" "genotype"
## [58] "geyser" "gilgais" "ginv"
## [61] "glm.convert" "glm.nb" "glmmPQL"
## [64] "hills" "hist.FD" "hist.scott"
## [67] "housing" "huber" "hubers"
## [70] "immer" "Insurance" "is.fractions"
## [73] "isoMDS" "kde2d" "lda"
## [76] "ldahist" "leuk" "lm.gls"
## [79] "lm.ridge" "lmsreg" "lmwork"
## [82] "loglm" "loglm1" "logtrans"
## [85] "lqs" "lqs.formula" "ltsreg"
## [88] "mammals" "mca" "mcycle"
## [91] "Melanoma" "menarche" "michelson"
## [94] "minn38" "motors" "muscle"
## [97] "mvrnorm" "nclass.freq" "neg.bin"
## [100] "negative.binomial" "negexp.SSival" "newcomb"
## [103] "nlschools" "npk" "npr1"
## [106] "Null" "oats" "OME"
## [109] "painters" "parcoord" "petrol"
## [112] "phones" "Pima.te" "Pima.tr"
## [115] "Pima.tr2" "polr" "psi.bisquare"
## [118] "psi.hampel" "psi.huber" "qda"
## [121] "quine" "Rabbit" "rational"
## [124] "renumerate" "rlm" "rms.curv"
## [127] "rnegbin" "road" "rotifer"
## [130] "Rubber" "sammon" "select"
## [133] "Shepard" "ships" "shoes"
## [136] "shrimp" "shuttle" "Sitka"
## [139] "Sitka89" "Skye" "snails"
## [142] "SP500" "stdres" "steam"
## [145] "stepAIC" "stormer" "studres"
## [148] "survey" "synth.te" "synth.tr"
## [151] "theta.md" "theta.ml" "theta.mm"
## [154] "topo" "Traffic" "truehist"
## [157] "ucv" "UScereal" "UScrime"
## [160] "VA" "waders" "whiteside"
## [163] "width.SJ" "write.matrix" "wtloss"