ropensci / refsplitr

R package for processing, organizing, and visualizing reference records downloaded from the Web of Science.
https://docs.ropensci.org/refsplitr
Other
55 stars 6 forks source link

Error in `$<-.data.frame`(`*tmp*`, "EM", value = c(NA_character_, NA_character_ : replacement has 2 rows, data has 1 #77

Closed oguzozbay closed 3 years ago

oguzozbay commented 3 years ago

I installed refsplitr package as follows: install.packages("remotes") remotes::install_github("embruna/refnet2")

For the sake of simplicity, I've given my data the same name as in your example. I runed the example code and because of errors I cleanend NA's as follows.

dat1 <- dat1 %>% filter(!is.na(AU)) dat1 <- dat1 %>% filter(!is.na(AF)) dat1 <- dat1 %>% filter(!is.na(EM))

However, when I run the code below: dat2 <- authors_clean(references = dat1) I got the following error.

Error in $<-.data.frame(*tmp*, "EM", value = c(NAcharacter, NAcharacter : replacement has 2 rows, data has 1

Do you have an idea for the solution. Best regards.

oguzozbay commented 3 years ago

Possibly I found the problem. I am trying it know. I changed all ; to , in EM collumn. The code is still runnig and did not give an error. Because my data is big, it will possibly take an hour. I will write the result.

embruna commented 3 years ago

From an author email to EMB: " I changed all semicolons (;) to comma (,) in EM collumn, error is disappeared"