r - `V<-`(`*tmp*`, value = `*vtmp*`) 中的错误:无效索引
问题描述
我在 R 中使用了 bibliometrix 函数,并想绘制一些有用的图表。
library(bibliometrix)
??bibliometrix
D<-readFiles("E:\\RE\\savedrecs.txt")
M <- convert2df(D,dbsource = "isi", format= "plaintext")
results <- biblioAnalysis(M ,sep = ";" )
S<- summary(object=results,k=10, pause=FALSE)
plot(x=results,k=10,pause=FALSE)
options(width=100)
S <- summary(object = results, k = 10, pause = FALSE)
NetMatrix <- biblioNetwork(M1, analysis = "co-occurrences", network = "author_keywords", sep = ";")
S <- normalizeSimilarity(NetMatrix, type = "association")
net <- networkPlot(S, n = 200, Title = "co-occurrence network",type="fruchterman", labelsize = 0.7, halo = FALSE, cluster = "walktrap",remove.isolates=FALSE, remove.multiple=FALSE, noloops=TRUE, weighted=TRUE)
res <- thematicMap(net, NetMatrix, S)
plot(res$map)
但在 中 net <- networkPlot(S, n = 200, Title = "co-occurrence network",type="fruchterman", labelsize = 0.7, halo = FALSE, cluster = "walktrap",remove.isolates=FALSE, remove.multiple=FALSE, noloops=TRUE, weighted=TRUE)
,它显示错误
V<-
(*tmp*
, value = )中的错误*vtmp*
:索引无效
. 我也不能做 CR,它总是显示 unlistCR。我也不能使用 NetMatrix 功能。一些帮助我plssssssss
解决方案
问题出在数据本身而不是您提供的代码中。当我从bibliometrix.com下载数据并在函数调用中更改M1
为M
(错字?)时,一切正常。biblioNetwork
请看下面的代码:
library(bibliometrix)
# Plot bibliometric analysis results
D <- readFiles("http://www.bibliometrix.org/datasets/savedrecs.txt")
M <- convert2df(D, dbsource = "isi", format= "plaintext")
results <- biblioAnalysis(M, sep = ";")
S <- summary(results)
plot(x = results, k = 10, pause = FALSE)
# Plot Bibliographic Network
options(width = 100)
S <- summary(object = results, k = 10, pause = FALSE)
NetMatrix <- biblioNetwork(M, analysis = "co-occurrences", network = "author_keywords", sep = ";")
S <- normalizeSimilarity(NetMatrix, type = "association")
net <- networkPlot(S, n = 200, Title = "co-occurrence network", type = "fruchterman",
labelsize = 0.7, halo = FALSE, cluster = "walktrap",
remove.isolates = FALSE, remove.multiple = FALSE, noloops = TRUE, weighted = TRUE)
# Plot Thematic Map
res <- thematicMap(net, NetMatrix, S)
str(M)
plot(res$map)
推荐阅读
- javascript - 如何使用变量在 Angular Material datepicker 上设置日期值?
- uwp - [UWP][收藏] 点击最后一项添加
- python - 比较时,为什么在 try/except 块中引发的异常不等于方法中的 HTTPError?
- javascript - 如何更改 Nuxt 构建的入口点?
- python - OpenCV triangulatePoints() 得到负深度,我做错了什么?
- javascript - 节点js追加到现有的csv文件所有数据都被追加到一个单元格
- git - git:合并方向之间的差异
- python - 熊猫数据框 KeyError
- r - 如何将变量名称和函数调用的 tibble 传递给 tibble
- c - 为什么代码在这个 char 比较中没有产生任何结果?