massimoaria / bibliometrix

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

Files must end with a newline Warning: Error in if: missing value where TRUE/FALSE needed #239

Open agnesjaque opened 2 years ago

agnesjaque commented 2 years ago

Dear all,

I'm trying to use biblioshiny and there's the following error:

**Converting your isi collection into a bibliographic dataframe

Files must end with a newline Warning: Error in if: missing value where TRUE/FALSE needed 155: isi2df 154: convert2df 150: eventReactiveValueFunc [C:\Users\Usuário\Documents\R\win-library\4.1\bibliometrix\biblioshiny/server.R#135] 106: DATAloading 105: exprFunc [C:\Users\Usuário\Documents\R\win-library\4.1\bibliometrix\biblioshiny/server.R#331] 104: widgetFunc 103: :: htmlwidgets shinyRenderWidget 102: func 89: renderFunc 88: renderFunc 84: renderFunc 83: output$contents 2: runApp 1: biblioshiny**

Would you please help me?

Thank you!

massimoaria commented 2 years ago

Please upload your file

Pengustc commented 2 years ago

I have also encountered the same problem, the code and data as follows:

devtools::install_github("massimoaria/bibliometrix") library(bibliometrix) file <- ("https://www.bibliometrix.org/datasets/savedrecs.txt") M <- convert2df(file, dbsource = "wos", format = "bibtex")

Then the error happened: Error in if (Papers[1] > 1) { : missing value where TRUE/FALSE needed.

massimoaria commented 2 years ago

The function returns an error because you selected an incorrect file format. The correct one is format = "plaintext". M <- convert2df(file, dbsource = "wos", format = "plaintext")

Pengustc commented 2 years ago

Ah, so this is the reason. But these lines of code I copied from the instructions document. image

At any rathe, thank you for your excellent package