摘要: 现有一份数据集,包含专家对于是否可以使用隐形眼镜的诊断记录(来自《数据挖掘》),尝试用R语言实现规则的提取。构造> spectacle = factor(rep(c(rep("myope",4),rep("hypermetrop",3)),3))> age = factor(c(rep("young... 阅读全文
posted @ 2015-03-09 15:16 Dearc 阅读(300) 评论(0) 推荐(0) 编辑
摘要: u = "http://www.rateinflation.com/consumer-price-index/usa-historical-cpi"页面有三个form一个from一个to,还有一个提交按钮forms = getHTMLFormDescription(u)[[1]]HTML Form:... 阅读全文
posted @ 2015-03-04 20:04 Dearc 阅读(813) 评论(0) 推荐(0) 编辑
摘要: 下面一段地址bing_search_rstudio_url = "http://cn.bing.com/search?q=rstudio&qs=AS&pq=rst&sc=8-3&sp=1&cvid=61252d92243847ca8025403c36db6f1c&FORM=QBLH"表单参数提取(与... 阅读全文
posted @ 2015-03-03 21:09 Dearc 阅读(353) 评论(0) 推荐(0) 编辑
摘要: RHTMLForms在R高版本中不可用,解决如下install_github("omegahat/RHTMLForms")提交表单,http://一定不能省略u = "http://www.bing.com"form = getHTMLFormDescription(u)[[1]];form得到HT... 阅读全文
posted @ 2015-03-03 20:49 Dearc 阅读(825) 评论(0) 推荐(0) 编辑
摘要: #3.8x <- seq(-2,3,0.05);y <- seq(-1,7,0.05)f <- function(x,y){x^4-2*x^2*y+x^2-2*x*y+4.5*x-4*y+4}z <- outer(x,y,f)par(mfrow = c(1,2))contour(x,y,z,leve... 阅读全文
posted @ 2015-03-03 13:06 Dearc 阅读(610) 评论(0) 推荐(0) 编辑
摘要: # 2.1x <- c(1,2,3);y <- c(4,5,6)e <- c(1,1,1)#1)z <- 2*x+y+e;z#2)crossprod(x,y)#3)outer(x,y)#2.2#按列输入(默认)A <- matrix(1:20,c(4,5))#按行输入B <- matrix(1:20... 阅读全文
posted @ 2015-02-27 10:39 Dearc 阅读(527) 评论(0) 推荐(0) 编辑