99999久久久久久亚洲,欧美人与禽猛交狂配,高清日韩av在线影院,一个人在线高清免费观看,啦啦啦在线视频免费观看www

熱線(xiàn)電話(huà):13121318867

登錄
2019-01-12 閱讀量: 872
因子的使用

> patientID <- c(1, 2, 3, 4)

> age <- c(25, 34, 28, 52)> diabetes <- c("Type1", "Type2", "Type1", "Type1")> status <- c("Poor", "Improved", "Excellent", "Poor")> diabetes <- factor(diabetes)> status <- factor(status, order=TRUE)> patientdata <- data.frame(patientID, age, diabetes, status)> str(patientdata)‘data.frame’: 4 obs. of 4 variables:

$ patientID: num 1 2 3 4

$ age : num 25 34 28 52

$ diabetes : Factor w/ 2 levels "Type1","Type2": 1 2 1 1

$ status : Ord.factor w/ 3 levels "Excellent"<"Improved"<..: 3 2 1 3

> summary(patientdata)

patientID age diabetes status

Min. :1.00 Min. :25.00 Type1:3 Excellent:1

1st Qu.:1.75 1st Qu.:27.25 Type2:1 Improved :1

Median :2.50 Median :31.00 Poor :2

Mean :2.50 Mean :34.75

3rd Qu.:3.25 3rd Qu.:38.50

Max. :4.00 Max. :52.00

0.0000
0
關(guān)注作者
收藏
評(píng)論(0)

發(fā)表評(píng)論

暫無(wú)數(shù)據(jù)
推薦帖子