massimoaria / bibliometrix

An R-tool for comprehensive science mapping analysis. A package for quantitative research in scientometrics and bibliometrics.
https://www.bibliometrix.org
Other
496 stars 147 forks source link

Error with thematicEvolution() #77

Closed koenraadvanmeerbeek closed 4 years ago

koenraadvanmeerbeek commented 4 years ago

I get some errors when using thematicEvolution(). I tried to run this function with one or two breaks, with the following errors as a result (the code works fine with the example dataset scientometrics):

years=c(1980,2000) TE <- thematicEvolution(M,field="ID",years=years,n=100,minFreq=2) Error in par(mfrow = c(1, (K - 1))) : invalid value specified for graphical parameter "mfrow" years=c(1990) TE <- thematicEvolution(M,field="ID",years=years,n=100,minFreq=2) Error in names(df) <- N : 'names' attribute [1] must be the same length as the vector [0]

My dataframe M is 2028 obs x 38 variables. I ran several other functions of your package. They all worked fine. I extracted the data from WoS (Full record and Cited references).

yuyllove commented 4 years ago

I also get some errors when using thematicEvolution() yearcut <- c(1979, 1989, 1999, 2009) nexus <- thematicEvolution(M, field = "DE", years = yearcut, n = 150 ) Error in V<-(*tmp*, value = *vtmp*) : invalid indexing

massimoaria commented 4 years ago

Please, attach your data and code so I can try to identify the issue

yuyllove commented 4 years ago

Thanks. My data and code were found in Open #79

koenraadvanmeerbeek commented 4 years ago

Thanks. My data is attached Full.zip

massimoaria commented 4 years ago

Thanks. My data is attached Full.zip

Your file contains documents published form 2019 to 2020. It's obvious that themativEvolution does not work when you set years <- c(1980,2000) or years <- c(1990).

massimoaria commented 4 years ago

I also get some errors when using thematicEvolution() yearcut <- c(1979, 1989, 1999, 2009) nexus <- thematicEvolution(M, field = "DE", years = yearcut, n = 150 ) Error in V<-(*tmp*, value = *vtmp*) : invalid indexing

You are tried to perform a Thematic Evolution Analysis on authors' keywords dividing the timespan into 5 periods using 4 cutting points. Looking at your collection, in the periods: 1971-1979 and 1980-1989 no document contains authors' keywords so the network matrices are empty and the function returns an error. If you try to spit your collection in larger periods or o perform the analysis on a different content field (i.e. title or abstract) all works fine.

In any case, the period 1971-1979 contains only two documents and the period 1980-1989 only 7. It does not make sense to perform a network analysis in such a small sub-collection.

When you have to decide how to choose the cutting point, the first thing is to have a look at the document annual distribution image