摘要: #中文 UTF-8编码 3.4.0library(Hmisc)mydata = read.table('clipboard',header = T)head(mydata)mycol=c(rgb(1,0,0,0.3),'cadetblue','darkseagreen', 'aquamarine3' 阅读全文
posted @ 2018-06-15 17:29 junjunang 阅读(255) 评论(0) 推荐(0) 编辑
摘要: n = 100g = 6 set.seed(g)d <- data.frame(x = unlist(lapply(1:g, function(i) rnorm(n/g, runif(1)*i^2))), y = unlist(lapply(1:g, function(i) rnorm(n/g, r 阅读全文
posted @ 2018-06-15 09:46 junjunang 阅读(144) 评论(0) 推荐(0) 编辑
摘要: distancePointLine <- function(x, y, slope, intercept) { ## x, y is the point to test. ## slope, intercept is the line to check distance. ## ## Returns 阅读全文
posted @ 2018-06-15 09:46 junjunang 阅读(628) 评论(0) 推荐(0) 编辑