- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在数据框中有这个大型语料库数据
res(数据框)
文本1
1 <NA>
2 beren stuart vanuatu monday october venkatesh ramesh sandeep talanki nagaraj subject approve qlikview gpa access process form gpa access email requestor line manager access granted raj add user qlikview workgroup gpa access form requestors lim tek kon vanuatu address lini high port vila efate title relationship manager emerging corporates employee id lan id limtk bsbcc authorising manager beren stuart vanuatu read gpa dashboard business technical reason na
text.2
1 <NA>
2 kumar santhosh behalf relationshipbankingfinancesupport friday october venkatesh cc global business reporting subject fw approve qlikview gpa access santhosh faunt daniel png wednesday october relationshipbankingfinancesupport cc amet sova subject fw approve qlikview gpa access unable approve excel due macro issues process amet sova monday october faunt daniel png subject approve qlikview gpa access review attached form click line manager approval approve
text.3
1 <NA>
2 thomson owen tonga thursday october venkatesh ramesh sandeep talanki nagaraj subject approve qlikview gpa access process form gpa access email requestor line manager access granted raj add user qlikview workgroup gpa access form requestors hia viliami address head office fakafanua centre maufanga vuna road nukualofa tongatapu tonga nukualofa tongatapu title nfc amu manager employee id lan id hiav bsbcc authorising manager thomson owen tonga read gpa dashboard business technical reason
1 <NA>
2 kumar rajesh fiji tuesday october venkatesh ramesh sandeep talanki nagaraj subject approve qlikview gpa access process form gpa access email requestor line manager access granted raj add user qlikview workgroup gpa access form requestors fong vincent address level anz house victoria parade suva suva viti levu title national manager commercial banking fiji employee id lan id fongv bsbcc authorising manager kumar rajesh fiji read gpa dashboard business technical reason user
text.5
1 <NA>
2 dennis david timor thursday october buchanan geoffrey solomon islands subject approve qlikview gpa access review attached form click line manager approval approve
text.6
1 <NA>
2 matthey christopher wednesday october pm parrott louise subject document file documentzip
text.7
1
2 tan jasmine thursday october pm global business reporting cc tan yong hoong rai dinkar subject rtc view report sep sensitivity confidential team don’ access sharepoint link arrange access jasmine ayyamperumal rajendran ramesh kumar behalf global business reporting tuesday october pm kumar gaurav hong kong tan jasmine seah linda shroff manish behan thibault hong kong clay iv william cc tan yong hoong rai dinkar tan matthew rb finance sim sui poh subramanian raghuveer murugeshaiah sunil subject rtc view report sep sensitivity confidential october dear attached sharepoint report rtc portfolio client list august report discussed individual reviews rtc financials full client financials pivot table excel file metrics clients note report based rtc client list dinkar queries client list review list december reporting excel file worksheets rtc summary default income measure product details pivot table product measures rtc data detail client level data grouping rtc rtc methodology explained queries email global business reporting issues accessing reports sharepoint sharepoint link ø gaurav kumar ø jasmine tan ø linda seah ø manish shroff ø thibault behan ø william clay global business reporting team
text.8
1 <NA>
2 deo ravinesh friday october venkatesh global business reporting cc monteleone elif kabyanga isaac pinto rufus kiribati kumar santhosh subject approve qlikview gpa access team assist rufus ceo kiribati gpa access ravi
text.9
1 <NA>
2 epoa regina thursday october relationshipbankingfinancesupport subject gpa analysis filled form reports assist cheers regina
text.10
1 <NA>
2 original message tseng rickson thursday october pm global business reporting cc kumar santhosh wong toto subject fw gpa importance high santhosh venkatesh quickly grant global iib gpa access mary macleod cheers rickson original message wong toto thursday october pm tseng rickson kumar santhosh subject gpa installed qlik marys desktop access account ready toto original message tseng rickson wednesday october kumar santhosh cc wong toto subject gpa santhosh email gbr mailbox requesting marys iib cfo access gpa helping setup cheers rickson original message kumar santhosh wednesday october tseng rickson cc wong toto subject gpa rickson continue email global business report mailbox venkatesh cover work find replacement sandeep software package windows package apcqliktechintabqvpluginsetupr santhosh original message tseng rickson tuesday october pm kumar santhosh cc wong toto subject gpa santhosh sandeep left bank dont whats software package win gpa plugin dont grant access mary cheers rickson original message wong toto tuesday october pm tseng rickson subject fw gpa rickson advise software package upgrade marys desktop win week add package ready toto original message yip vivian tuesday october pm wong toto subject fw gpa toto gpa installed mary macleods desktop computerbefore friday october rickson computer lan id window version order installation advise vivian yip executive assistant mr gilles planté deputy ceo iib anz exchange square connaught place central hong kong phone original message broker ali tuesday october pm yip vivian tseng rickson li shirley cc macleod mary scott nicola subject gpa vivian gpa installed marys laptop installed rickson spend minutes mary week mary hk ali
text.11
1 <NA>
2 ang vanessa tuesday october global business reporting subject discontinued commercial fum performance report monday october team advise reach moving forward information required vanessa ayyamperumal rajendran ramesh kumar behalf global business reporting tuesday october au yeung ivy bhuta chintan chang frank chok christopher chuang jacky china dyer andy goyal aseem gupta vivek jiang charles li shirley lim jasmine ec loh jonathan mcleod donnelle miller greg singapore praswitrianto rama roumier frederic hong kong leoni kelly hong kong runciman gary hong kong shankar vijay soh serene tong nelson tran dang cecilia tseng rickson yeh anita yeung jonathan hong kong tse ying tin yew lolita ang benedict hong kong lea danay lin gloria tong mike chuang jacky china chen carrie china poon yen chi anita qian jack chow frankie jiang helen china oum morokot dith sochal kheng sopheakchenda wong theodore foo chang horng bhattacharya arnab truong kent hong kong chan vincent cy hong kong skien craig hong kong lau vincent yeung jonathan hong kong sum selina chok christopher yau emily lee irene hong kong chung margaret lam betty turel kaiwan chan david hong kong chak katherine cheng wilson hong kong chiu polly dhupar karan chow ruskin hong kong wong sunny minam saud fiji damayanti meirina eka bahashwan rifai venkatesh shailesh sucianto lucy kartadinata paul tye alan ng wee lee diana ang sarup adesh lim jasmine ec yeoh hin ler adrain ang vanessa vu pham linh phuong tran thi sinh vietnam bui thanh van nadarajah lavanya vietnam lee john chu sally chou peter huang sophia tw tb lin lydia chang richard hsu ken huang michelle chow winnie tw tb cc mathad vijayakumar kumar santhosh subramanian raghuveer mohan durga subject discontinued commercial fum performance report monday october monday october commercial fum performance report forward due change business structure back friday oct global business reporting anz support services india manyata embassy business park bangalore email global business reporting
pattern<- "([a][c][c][e][s][s]|[r][e][p][o][r][t]|[d][a][t][a])"
O<-lapply(res, function(x) str_extract_all(x,pattern) )
$text
$text[[1]]
[1] "access" "access" "access" "access"
$text[[2]]
[1] "report" "access" "access" "access"
$text[[3]]
[1] "access" "access" "access" "access"
$text[[4]]
[1] "access" "access" "access" "access"
$text[[5]]
[1] "report" "access" "access" "access" "access" "access" "access" "access"
$text[[6]]
[1] "report" "access" "access" "report" "access" "access" "access" "access" "access" "access"
$text[[7]]
[1] "report" "report" "access" "access" "report" "report" "report" "report" "report" "report" "data" "data" "report"
[14] "access" "report" "report"
$text[[8]]
[1] "report" "access" "access"
$text[[9]]
[1] "report" "access" "access" "access" "report"
$text[[10]]
[1] "report" "access" "access" "access" "report" "access"
str_count
实现这一目标,但没有帮助。我在 STO 中发现了许多与 Q 相关的字数统计,但在 R 中没有发现列表类型。
dd<-lapply(O,function(x) c<-str_count(x))
O <- structure(list(text= list(c("access", "access","access", "access"),
c("report","access", "access", "access"),
c("access","access", "access", "access"),
c("access","access", "access", "access"),
c("access"),
c(character(0)),
c("report", "report", "access", "access","report", "report", "report", "report", "report", "report",
"data", "data", "report", "access", "report", "report"),
c("report", "access","access"),
c("report"), c("report", "access", "access", "access", "report","access"))))
frq1 <- findFreqTerms(O)
不工作
最佳答案
好的,告诉我这对你有什么作用。
使用这些数据:
O <- structure(list(text.1 = list(character(0), c("access", "access",
"access", "access")), text.2 = list(character(0), c("report",
"access", "access", "access")), text.3 = list(character(0), c("access",
"access", "access", "access")), text.4 = list(character(0), c("access",
"access", "access", "access")), text.5 = list(character(0), "access"),
text.6 = list(character(0), character(0)), text.7 = list(
character(0), c("report", "report", "access", "access",
"report", "report", "report", "report", "report", "report",
"data", "data", "report", "access", "report", "report"
)), text.8 = list(character(0), c("report", "access",
"access")), text.9 = list(character(0), "report"), text.10 = list(
NULL, c("report", "access", "access", "access", "report",
"access"))), .Names = c("text.1", "text.2", "text.3",
"text.4", "text.5", "text.6", "text.7", "text.8", "text.9", "text.10"
))
text.x
的第二个元素中列表,我们会将这些单词放入
newlist
.更重要的是,我们会将这些数据转换为因子,以便稍后将它们重新组合成一个数据框。
newlist <- list()
for(item in O) {
newlist[[length(newlist)+1]] <- factor(item[[2]], levels = c("access", "data", "report"))
}
dd <- data.frame(lapply(newlist, table))
dd <- t(as.matrix(dd[,c(2,4,6,8,10,12,14,16,18,20)]))
rownames(dd) <- paste0("Text.",1:10)
colnames(dd) <- c("access", "data", "report")
dd
# access data report
# Text.1 4 0 0
# Text.2 3 0 1
# Text.3 4 0 0
# Text.4 4 0 0
# Text.5 1 0 0
# Text.6 0 0 0
# Text.7 3 2 11
# Text.8 2 0 1
# Text.9 0 0 1
# Text.10 4 0 2
关于r - 计算词列表中的词频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29530584/
SQL 和一般开发的新手,我有一个表(COUNTRIES),其中包含字段(INDEX、NAME、POPULATION、AREA) 通常我添加一个客户端(Delphi)计算字段(DENSITY)和 On
我想使用 calc(100%-100px),但在我的 demo 中不起作用由于高度只接受像素,因此如何将此百分比值转换为像素。 最佳答案 以下将为您提供高度: $(window).height();
我正在尝试在 MySQL 中添加列并动态填充其他列。 例如我有一张表“数字”并具有第 1 列、第 2 列、第 3 列,这些总数应填充在第 4 列中 最佳答案 除非我误解了你的问题,否则你不只是在寻找:
我想返回简单计算的结果,但我不确定如何执行此操作。我的表格如下: SELECT COUNT(fb.engineer_id) AS `total_feedback`, SUM(fb.ra
我一直在尝试做这个程序,但我被卡住了,我仍然是一个初学者,任何帮助将不胜感激。我需要程序来做 打印一个 10 X 10 的表格,其中表格中的每个条目都是行号和列号的总和 包含一个累加器,用于计算所有表
这个计算背后一定有一些逻辑。但我无法得到它。普通数学不会导致这种行为。谁能帮我解释一下原因 printf ("float %f\n", 2/7 * 100.0); 结果打印 1.000000 为什么会
我想计算从 0 到 (n)^{1/2} - 1 的数字的 AND每个数字从 0 到 (n)^{1/2} - 1 .我想在 O(n) 中执行此操作时间,不能使用 XOR、OR、AND 运算。 具体来说,
如何在 Excel 中将公式放入自定义数字格式?例如(出于说明目的随机示例), 假设我有以下数据: 输入 输出 在不编辑单元格中的实际数据的情况下,我想显示单元格中的值除以 2,并保留两位小数: 有没
每次我在 Flutter 应用程序中调用计算()时,我都会看到内存泄漏,据我所知,这基本上只是一种生成隔离的便捷方法。我的应用程序内存占用增加并且在 GC 之后永远不会减少。 我已将我的代码简化为仅调
我有数字特征观察 V1通过 V12用于目标变量 Wavelength .我想计算 Vx 之间的 RMSE列。数据格式如下。 每个变量“Vx”以 5 分钟的间隔进行测量。我想计算所有 Vx 变量的观测值
我正在寻找一种使用 C 语言计算文件中未知字符数的简单方法。谢谢你的帮助 最佳答案 POSIX 方式(可能是您想要的方式): off_t get_file_length( FILE *file ) {
我正在使用 Postgres,并且我正试图围绕如何在连续日期跨度中得出第一个开始日期的问题进行思考。例如 :- ID | Start Date | End Date =================
我有一个订单表格,我在其中使用 jQuery 计算插件来汇总总数。 此求和工作正常,但生成的“总和”存在问题。总之,我希望用逗号替换任何点。 代码的基础是; function ($this) {
我在使用 double 变量计算简单算术方程时遇到问题。 我有一个具有 double 属性 Value 的组件,我将此属性设置为 100。 然后我做一个简单的减法来检查这个值是否真的是 100: va
我在这里看到了一些关于 CRC 32 计算的其他问题。但没有一个让我满意,因此是这样。 openssl 库是否有任何用于计算 CRC32 的 api 支持?我已经在为 SHA1 使用 openssl,
当我在PHP日期计算中遇到问题时,我感到惊讶。 $add = '- 30 days'; echo date('Y-m-01', strtotime($add)); // result is 2017-
我正在使用 javascript 进行练习,我编写了这个脚本来计算 2 个变量的总和,然后在第三个方程中使用这个总和!关于如何完成这项工作的任何想法都将非常有用! First Number:
我有一个来自EAC的提示单和一个包含完整专辑的FLAC文件。 我正在尝试制作一些python脚本来播放文件,因为我需要能够设置在flac文件中开始的位置。 如何从CueSheet格式MM:SS:FF转
这个问题已经有答案了: Adding two numbers concatenates them instead of calculating the sum (24 个回答) 已关闭去年。 我有一个
4000 我需要上面字段 name="quantity" 和 id="price" 中的值,并使用 javascript 函数进行计算,并将其显示在字段 id= 中仅当我单击计算按钮时才显示“总
我是一名优秀的程序员,十分优秀!