V <-`(`* tmp *`,value =`* vtmp *`)错误:无效索引

时间:2018-08-17 10:59:00

标签: r bibliography

我在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*,值= *vtmp*)中的错误:无效的索引编制

。我也不能执行CR,它始终显示unlistCR。我也不能使用NetMatrix函数。 一些帮助我请

1 个答案:

答案 0 :(得分:0)

问题出在数据本身而不是您提供的代码中。当我从bibliometrix.com下载数据并在M1函数中将M更改为biblioNetwork(typo?)时,一切正常。请参见下面的代码:

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)

enter image description here

# 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)

enter image description here

# Plot Thematic Map
res <- thematicMap(net, NetMatrix, S)
str(M)
plot(res$map)

map