Closed GitNoise closed 4 years ago
I'll look into it; synthesisr should have been installed automatically since it is a dependency but I must have misspecified it somewhere.
In the meantime: devtools::install_github("rmetaverse/synthesisr")
will solve the problem.
@elizagrames
I am happy to help narrow down issues and debug. It would be helpful if you let us known which version of synthesir you're using, so I can install that version.
packageVersion("synthesisr")
‘0.2.0’
Hi,
synthesisr 0.2.0 has changed some functions, not only in the implementation but also in the parameters specification. Currently, litsearchr::remove_duplicates
calls synthesisr::find_duplicates
with the wrong parameters, since the latest version of synthesisr::find_duplicates
does not accept match_variable
as a parameter. To overcome this problem, I used synthesisr::deduplicate
directly. This allows finding and removing duplicates in a dataset, all in one go. I believe that litsearchr::remove_duplicates
could be easily updated by making it call synthesisr::deduplicate
directly. Hope this helps...
Maybe using dependency management tool would solve these issues.. I've seen multiple issues here before which seem to be dependent on version changes. Have a look at this: https://blog.learningtree.com/manage-packages-in-r-how/
My version is:
packageVersion("synthesisr") [1] ‘0.2.0’
Maybe using dependency management tool would solve these issues
Or just rewriting the functions that depend on synthesisr to get rid of the dependence. Litsearchr and synthesisr look like they're being developed independently. These issues will keep coming up.
@elizagrames could ask the synthesisr to merge projects or ask to (more-or-less) copy-paste their code into litsearchr.
So the long story short is that I write the code for both litsearchr and synthesisr and have somehow royally screwed things up. I moved the basic importing and deduplication code to synthesisr but retained wrapper functions in litsearchr because of descriptions in the published paper for litsearchr. When Martin updated the synthesisr dedupe functions, this broke litsearchr calls to it. I will sort out the discrepancies between packages ASAP.
Hi: Suggest modifications to the original _removeduplicates function:
remove_duplicates <- function (df,field, method = c("stringdist", "fuzzdist", "exact")) { df <- synthesisr::deduplicate(data=df, match_by=field, match_function = method) return(df) }
This is now fixed exactly as suggested.
Every command which is dependent on synthesisr fail.
For instance, running
naiveresults <- litsearchr::remove_duplicates(naiveimport, field = "title", method = "stringdist")
results in:I am trying to follow the tutorial / example at https://elizagrames.github.io/litsearchr/litsearchr_vignette_v030.html.
I installed litsearcher like this: