Closed tzengji closed 4 years ago
Sorry, but I am not able to replicate your issue. If I run the code, all works well on my PC
file <- "https://www.bibliometrix.org/datasets/pubmed_txt.txt"
M <- convert2df(file, dbsource = "pubmed", format = "pubmed")
Converting your pubmed collection into a bibliographic dataframe
Done!
Generating affiliation field tag AU_UN from C1: Done!
Try to update bibliometrix from github
Dear Sir
Thank you for the prompt reply.
Your solution is right.
I have removed the bibliometrix package from CRAN and re-installed it from GitHub. It works perfect now.
I think the problem is due to the old version of vctrs package.
devtools::install_github("massimoaria/bibliometrix") Downloading GitHub repo massimoaria/bibliometrix@master These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?
1: All
2: CRAN packages only
3: None
4: vctrs (0.2.4 -> 0.3.0) [CRAN]
5: scales (1.1.0 -> 1.1.1) [CRAN]
6: tidyselect (1.0.0 -> 1.1.0) [CRAN]
7: tidygraph (1.1.2 -> 1.2.0) [CRAN]
The similar problem occurred elsewhere at other R packages.
https://github.com/IndrajeetPatil/ggstatsplot/issues/396 https://github.com/IndrajeetPatil/groupedstats/issues/24
Thanks again.
Tzeng-Ji Chen
A similar error occurs in localCitations function My R version is 4.0.1, and the Rstudio version is 1.3.959. I updated all packages. I updated the bibliometrix package using the code 'devtools::install_github("massimoaria/bibliometrix")' .
My code is as follow: easypackages::packages('bibliometrix','rio') wosfiles <-'F:/data/b7944_1-500.txt' Bw <- convert2df(file = wosfiles, dbsource = 'wos', format = 'plaintext') lcs <- localCitations(Bw)
The results are as follow: -----start----- WOS DB: Searching local citations (LCS) by reference items (SR) and DOIs...
Analyzing 309867 reference items...
error: x
must be a vector, not a data.frame/bibliometrixDB
object.
Run rlang::last_error()
to see where the error occurred.
------end------
Run 'rlang::error()'.
The results are as follow:
-----start-----
<error/vctrs_error_scalar_type>
x
must be a vector, not a data.frame/bibliometrixDB
object.
Backtrace:
rlang::last_trace()
to see the full context.
------end------My version of vctrs package is 0.3.1(it is the newest version).
I tried several methods to explore this issue:
I don't known why it does not work in the R 4.0.1 version?
Thanks for your excellent work best, Yunlong Yu
My data: b7944_1-500.txt
Unfortunately, I am not able to identify the issue.
Using my MacBook 10.15 with Rstudio 1.3.959, R 4.0.1, and all R packages updated, your script works fine. Here my results:
wosfiles <-'b7944_1-500.txt' Bw <- convert2df(file = wosfiles, dbsource = 'wos', format = 'plaintext')
Converting your wos collection into a bibliographic dataframe
Done!
Generating affiliation field tag AU_UN from C1: Done!
lcs <- localCitations(Bw)
WOS DB: Searching local citations (LCS) by reference items (SR) and DOIs...
Analyzing 10666 reference items...
Found 174 documents with no empty Local Citations (LCS)
I think the issue depends on a bug of the rlang package included in the R 4.0 version.
Thanks. 发自我的华为手机-------- 原始邮件 --------发件人: Massimo Aria notifications@github.com日期: 2020年6月12日周五 15:14收件人: massimoaria/bibliometrix bibliometrix@noreply.github.com抄送: yuyllove yuyllove@yeah.net, Comment comment@noreply.github.com主 题: Re: [massimoaria/bibliometrix] Error in importing data from PubMed (#108) Unfortunately, I am not able to identify the issue. Using my MacBook 10.15 with Rstudio 1.3.959 and R 4.0.1, the functions work fine.
wosfiles <-'b7944_1-500.txt' Bw <- convert2df(file = wosfiles, dbsource = 'wos', format = 'plaintext')
Converting your wos collection into a bibliographic dataframe Done! Generating affiliation field tag AU_UN from C1: Done!
lcs <- localCitations(Bw)
WOS DB: Searching local citations (LCS) by reference items (SR) and DOIs... Analyzing 10666 reference items... Found 174 documents with no empty Local Citations (LCS)
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
I discovered that the issue is due to a bug of dplyr and R 4.0. I have just added a commit that solves it.
(https://cran.r-project.org/web/packages/bibliometrix/vignettes/Data-Importing-and-Converting.html)
In executing the code (bibliometrix 3.0.0), an error occurred:
file <- "https://www.bibliometrix.org/datasets/pubmed_txt.txt" M <- convert2df(file, dbsource = "pubmed", format = "pubmed")
Error: Names must be unique.
Run
rlang::last_error()
to see where the error occurred.TKS for the new version. Best regards Tzeng-Ji Chen