楼主: lvzhp06
3241 3

[统计软件] 求助R数据挖掘,getNodeSet函数的正则表达式怎么写? [推广有奖]

  • 1关注
  • 12粉丝

已卖:1958份资源

教授

45%

还不是VIP/贵宾

-

威望
0
论坛币
9481 个
通用积分
28.4554
学术水平
9 点
热心指数
13 点
信用等级
5 点
经验
23299 点
帖子
724
精华
0
在线时间
1473 小时
注册时间
2009-1-1
最后登录
2025-5-8

楼主
lvzhp06 发表于 2015-9-20 20:20:02 |AI写论文
100论坛币
查找下面这一段代码,url<-"http://www.renrendai.com/lend/loanList.action"
url.html<-htmlParse(url,encoding="UTF-8")
xpath<-"//*/script[@id='loan-list-rsp']"url.node<-getNodeSet(url.html,xpath)

这么写这能找到下面这么一大段,可是我只想找到其中
短期周转,购买车,以及其他的一些数据等。
能不能把这些信息提取出来,或者直接定位到这个地方呢?




<script id="loan-list-rsp" type="text/x-json">{"status":0,"data":{"loans":[{"loanId":741749.0,"title":"短期周转","picture":"","amount":39500.0,"interest":10.5,"months":18.0,"loanType":"DEBX","status":"IN_PROGRESS","allowAccess":false,"utmSource":"debx-as","openTime":"Sep 11, 2015 3:37:19 PM","startTime":"Sep 27, 2015 3:39:50 PM","readyTime":"Sep 20, 2015 3:40:10 PM","passTime":"Sep 20, 2015 3:51:44 PM","surplusAmount":0.0,"finishedRatio":100.0,"repaidByGuarantor":false,"borrowerId":2280194.0,"forbidComment":false,"nickName":"131276.as","borrowerLevel":"A","displayLoanType":"JGDB","currentIsRepaid":false,"amountPerShare":0.0,"oldLoan":false,"interestPerShare":0.0,"principal":0.0,"leftMonths":18.0,"overDued":false,"beginBidTime":"Sep 20, 2015 3:39:50 PM","productId":32.0},{"loanId":741799.0,"title":"购买车","picture":"","amount":28100.0,"interest":11.0,"months":24.0,"loanType":"DEBX","status":"IN_PROGRESS","allowAccess":false,"utmSource":"debx-as","openTime":"Sep 11, 2015 3:40:08 PM","startTime":"Sep 27, 2015 3:40:13 PM","readyTime":"Sep 20, 2015 3:40:21 PM","passTime":"Sep 20, 2015 3:51:37 PM","surplusAmount":0.0,"finishedRatio":100.0,"repaidByGuarantor":false,"borrowerId":2280254.0,"forbidComment":false,"nickName":"131327.as","borrowerLevel":"A","displayLoanType":"JGDB","currentIsRepaid":false,"amountPerShare":0.0,"oldLoan":false,"interestPerShare":0.0,"principal":0.0,"leftMonths":24.0,"overDued":false,"beginBidTime":"Sep 20, 2015 3:40:13 PM","productId":32.0},{"loanId":741798.0,"title":"扩大经

关键词:Nodes 正则表达式 R数据挖掘 Node ODEs interest amount months status 表达式

沙发
lvzhp06 发表于 2015-9-20 20:20:42
@qoiqpwqr,
熊哥能不能帮忙看一下

藤椅
lvzhp06 发表于 2015-9-21 08:26:08
哎,没人会吗。。。

板凳
ryoeng 在职认证  发表于 2015-10-21 22:22:08

添加个人签名

提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2026-1-2 12:21