elizagrames / litsearchr

litsearchr is an R package to partially automate search term selection for systematic reviews using keyword co-occurrence networks. In addition to identifying search terms, it can write Boolean searches and translate them into over 50 languages.
https://elizagrames.github.io/litsearchr
101 stars 24 forks source link

importing multiple datasets #23

Open rachaelantwis opened 4 years ago

rachaelantwis commented 4 years ago

Hi, I'm new to this package, thanks very much for developing it - it looks great! I'm having a bit of trouble getting the data in. I've conducted a search in Web of Science for a particular set of keywords. This returned ~1600 results, which I downloaded as .txt files in batches of 500. I have tried importing these using this code (the "literature" file contains the four .txt files that I exported from WoS):

search_directory <- "~/Desktop/literature/"
naiveimport <- litsearchr::import_results(directory = "~/Desktop/literature/", filename = NULL, save_dataset = FALSE)

but I get the following error:

line 1 appears to contain embedded nullsline 2 appears to contain embedded nullsline 3 appears to contain embedded nullsline 4 appears to contain embedded nullsline 5 appears to contain embedded nullsError in make.names(col.names, unique = TRUE) : invalid multibyte string at 'P'

I have the same problem when using:

naiveimport <- litsearchr::import_results(search_directory, remove_duplicates = FALSE, clean_dataset = TRUE, save_full_dataset = FALSE)

Sorry, it's probably something very straightforward! Many thanks in advance

simone-mordue commented 4 years ago

Hi All,

I am also having a problem when importing web of science results. test <- import_results("C:/Users/nsm131/OneDrive - Newcastle University/SDG_model/Litsearchr/climate/", "/savedrecs2.csv") with the error

Error in all.equal(colnames(df), expected_columns) : object 'expected_columns' not found

Please could someone help solve this problem?

lmoliner commented 4 years ago

Hi, I had problems using the import_results command, I found out that the format that normally works is .ris (except for Web of Science that can be in .txt and Greenfile that should be saved in .bib format), the documentation says:

If a .bib or .ris file returns an error, there is likely a character encoding or formatting issue with the file. Please try uploading your .bib or .ris file to a reference manager (e.g. Zotero) and re-exporting it as a .bib or .ris, which often clears up formatting issues that import_results cannot detect.

Details about how to export search results (formats) are in the old vignette in the following link:

https://elizagrames.github.io/litsearchr/introduction_vignette_v010.html

Also:

If you have naive search results from a different database, format them (we suggest using the select() function in dplyr) to have the following columns in order: id, text, title, abstract, keywords, methods, type, authors, affiliation, source, year, volume, issue, startpage, endpage, doi, language, database. Columns can be left blank, but all the columns need to be included and ordered correctly so that you can then rbind() your data frame to the data frame created with import_results().

Hope this helps!

seschaub commented 3 years ago

For me txt file from Web of Science did not work. What works is the bib format. Thus: Export to Other File Formats > Record Content: Full Record > File Format: BibTeX.