摘要: ### subset 函数 airquality <- airquality #选取Temp大于80的行,保留Ozone,temp两列 subset(airquality, Temp > 80, select = c(Ozone, Temp)) #选取day等于1的行,删去temp列 subset( 阅读全文
posted @ 2021-12-24 11:19 西西与维奥拉 阅读(546) 评论(0) 推荐(0) 编辑
摘要: ifelse returns a value with the same shape as test which is filled with elements selected from either yes or no depending on whether the element of te 阅读全文
posted @ 2021-12-24 09:55 西西与维奥拉 阅读(557) 评论(0) 推荐(0) 编辑
摘要: 输入top 查看后台 找到自己所属编号 输入 kill -9 编号 阅读全文
posted @ 2021-12-23 11:57 西西与维奥拉 阅读(31) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/44e3de9b7a81原文链接 paste("a","b") #能连接a b ## [1] "a b" paste("a","b","c") ## [1] "a b c" #设置分隔符 paste("a","b",sep = "=")##注意到用 阅读全文
posted @ 2021-11-18 10:21 西西与维奥拉 阅读(533) 评论(0) 推荐(0) 编辑
摘要: kk <- dt[which(dt$ITEMCODE=="RDW-SD"&is.na(dt$ITEMNAME)),] kk <- dt[which((dt$ITEMCODE=="PLT-I"|dt$ITEMNAME=="PLT")&is.na(dt$ITEMNAME)),] 阅读全文
posted @ 2021-11-16 17:06 西西与维奥拉 阅读(652) 评论(0) 推荐(0) 编辑
摘要: #删去data表中第五列 data<- data[,-5] #删去某几列 data <- data[,-c(6:9)] #subset data <- subset(data,select=-c(colnames5)) data <- subset(data,select=- c(colname6: 阅读全文
posted @ 2021-11-16 16:25 西西与维奥拉 阅读(4422) 评论(0) 推荐(0) 编辑
摘要: AA <- dplyr::summarise(group_by(dataframe1,col1,col2),num=n()) col1 和 col2 内容匹配情况下,出现的频率 阅读全文
posted @ 2021-11-16 16:06 西西与维奥拉 阅读(114) 评论(0) 推荐(0) 编辑
摘要: test3 <- reshape::cast(dat[,c(1:6)],col1+col2+col3+col4~col5,mean) 阅读全文
posted @ 2021-11-16 15:13 西西与维奥拉 阅读(133) 评论(0) 推荐(0) 编辑
摘要: dat$RESULT <- as.numeric(dat$RESULT) 阅读全文
posted @ 2021-11-16 15:08 西西与维奥拉 阅读(1775) 评论(0) 推荐(0) 编辑
摘要: dat$CHECKDATE <- as.Date(dat$CHECKDATE) 阅读全文
posted @ 2021-11-16 15:01 西西与维奥拉 阅读(1018) 评论(0) 推荐(0) 编辑