上一页 1 ··· 158 159 160 161 162 163 164 165 166 ··· 324 下一页
摘要: a = matrix( c(2, 4, 3, 1, 5, 7), # the data elements nrow=2, # number of rows ncol=3, # number of columns byrow = TRUE) # fill matrix by rows class( ( 阅读全文
posted @ 2018-05-25 02:12 emanlee 阅读(172) 评论(0) 推荐(0) 编辑
摘要: require(reshape2)x = data.frame(subject = c("John", "Mary"), time = c(1,1), age = c(33,NA), weight = c(90, NA), height = c(2,2))x subject time age wei 阅读全文
posted @ 2018-05-08 04:59 emanlee 阅读(222) 评论(0) 推荐(0) 编辑
摘要: read.csv in R doesn't import all rows from csv file The OP indicates that the problem is caused by quotes in the CSV-file. When the records in the CSV 阅读全文
posted @ 2018-05-04 21:48 emanlee 阅读(228) 评论(0) 推荐(0) 编辑
摘要: union 求两个向量的并集集合可以是任何数值类型union(x=1:3, y=2:5)[1] 1 2 3 4 5union(x=c("abc", "12"), y=c("bcd", "efg"))[1] "abc" "12" "bcd" "efg"setdiff 求向量x与向量y中不同的元素(只取 阅读全文
posted @ 2018-04-29 10:04 emanlee 阅读(657) 评论(0) 推荐(0) 编辑
摘要: Examples: print(match(5, c(1,2,9,5,3,6,7,4,5)))[1] 4 5 %in% c(1,2,9,5,3,6,7,4,5)[1] TRUE 8 %in% c(1,2,9,5,3,6,7,4,5)[1] FALSE > v1 <- c("a1","b2","c1" 阅读全文
posted @ 2018-04-28 04:27 emanlee 阅读(219) 评论(0) 推荐(0) 编辑
摘要: I think I get what you mean. Let's say for example you want the right-most \ in the following string (which is stored in cell A1): Drive:\Folder\SubFo 阅读全文
posted @ 2018-04-25 06:41 emanlee 阅读(325) 评论(0) 推荐(0) 编辑
摘要: REF: https://stackoverflow.com/questions/16391208/print-a-files-last-modified-date-in-bash 阅读全文
posted @ 2018-04-25 04:59 emanlee 阅读(202) 评论(0) 推荐(0) 编辑
摘要: IQR(Inter-Quartile Range)在统计中叫内距.内距又称为四分位差.具体如下:内距IQR即Inter-Quartile Range, 这是统计技术上的名词.内距又称为四分位差,是两个四分位数之差,即内距IQR=高四分位数—低四分位数.标准化四分位距——对一组按顺序排列的数据,上四分 阅读全文
posted @ 2018-04-24 09:11 emanlee 阅读(9353) 评论(0) 推荐(1) 编辑
摘要: 1. nohup nohup 无疑是我们首先想到的办法。顾名思义,nohup 的用途就是让提交的命令忽略 hangup 信号。 nohup 的使用是十分方便的,只需在要处理的命令前加上 nohup 即可,标准输出和标准错误缺省会被重定向到 nohup.out 文件中。一般我们可在结尾加上"&"来将命 阅读全文
posted @ 2018-03-16 22:53 emanlee 阅读(8171) 评论(0) 推荐(0) 编辑
摘要: apply() apply(m,dimcode,f,fargs) m 是一个矩阵。 dimcode 是维度编号,取1则为对行应用函数f,取2则为对列运用函数f。 f 是函数 fargs 是函数f的可选参数集 > z <- matrix(1:6, nrow = 3) > f <- function(x 阅读全文
posted @ 2018-03-09 12:38 emanlee 阅读(5821) 评论(0) 推荐(0) 编辑
上一页 1 ··· 158 159 160 161 162 163 164 165 166 ··· 324 下一页