I’m encountering an error when using the biblioshiny() function from the bibliometrix package in R. The error message I receive is:
Error in is.null(host) || is.na(host) :
‘length = 2212’ in coercion to ‘logical(1)’
Below is my script:
# Install and load bibliometrix package
if (!requireNamespace("bibliometrix", quietly = TRUE)) {
install.packages("bibliometrix")
}
library(bibliometrix)
# Load and convert Scopus files
S1 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/scopus1.csv", dbsource = "scopus", format = "csv")
S2 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/scopus2.csv", dbsource = "scopus", format = "csv")
S3 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/scopus3.csv", dbsource = "scopus", format = "csv")
S4 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/scopus4.csv", dbsource = "scopus", format = "csv")
S6 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/scopus6.csv", dbsource = "scopus", format = "csv")
S11 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/scopus11.csv", dbsource = "scopus", format = "csv")
# Merge Scopus data frames
S <- rbind(S1, S2, S3, S4, S6, S11)
# Load and convert WOS files
W6 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/savedrecs6.txt", dbsource = "wos", format = "plaintext")
W9 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/savedrecs9.txt", dbsource = "wos", format = "plaintext")
W11 <- convert2df("C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/savedrecs11.txt", dbsource = "wos", format = "plaintext")
# Check column names
colnames(W6)
colnames(W9)
colnames(W11)
# Find common columns between all data frames
common_columns <- Reduce(intersect, list(colnames(W6), colnames(W9), colnames(W11)))
# Select only common columns in each data frame
W6 <- W6[, common_columns]
W9 <- W9[, common_columns]
W11 <- W11[, common_columns]
# Merge WOS data frames
W <- rbind(W6, W9, W11)
# Merge data frames from different sources
U <- mergeDbSources(S, W, remove.duplicated = TRUE)
# Export merged data frame to a CSV file
write.table(U, "C:/Users/Letícia Marques/Documents/MESTRADO LELÊ/Projeto/ARTIGO 1 - Metanálise/Strings/13.07/DadosBibliometrix.csv", sep = ";", row.names = FALSE)
# Perform bibliometric analysis
Res <- biblioAnalysis(U)
DS <- summary(object = Res, k = 20)
# Visualize results
plot(Res, k=7)
# Launch biblioshiny with the data frame U
biblioshiny(U)
I have already tried the following steps to resolve the issue:
Checked the structure of the data frame U to ensure it is correctly structured.
Reduced the size of the data frame to see if the problem is related to data size or complexity.
Updated all packages, including bibliometrix.
Tried running the script in a clean R session.
Despite these attempts, the problem persists. How can I resolve this error and successfully launch biblioshiny() with my data?
Letícia Melo Silva Marques is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.