Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to view duplicates from Revtools #31

Open
RBrady1997 opened this issue May 28, 2020 · 1 comment
Open

How to view duplicates from Revtools #31

RBrady1997 opened this issue May 28, 2020 · 1 comment

Comments

@RBrady1997
Copy link

Hi Martin,

I am a fairly new R user and came across your package and am interested to try it out. Thank you for developing it.

I have managed to get the following code to work with one of your example data sets:
library(revtools)

data <- read_bibliography("restoration_scopus.ris")

matches <- find_duplicates(data, match_variable = "title").

In the environment section it shows there is matches but I am unsure how to view these. Do I need to add more code?

Thank you for your assistance in advance
Ruth

@mjwestgate
Copy link
Owner

mjwestgate commented May 28, 2020

Hi Ruth,
Thanks for getting in touch, and for trying out revtools! I hope it's useful.

To answer your question; find_duplicates() calculates duplicates, but doesn't show them to you. If you want to view them, I'd suggest making a new column in data called matches and passing the whole thing to screen_duplicates to decide which duplicates are correct. The full code for that would be:

data <- read_bibliography("restoration_scopus.ris")
matches <- find_duplicates(data, match_variable = "title")
data$matches <- matches # makes a new column
new_data <- screen_duplicates(data)

Note that once you are done, all your changes will be visible in the new object new_data.

The alternative is to just assume that find_duplicates has got everything right and just extract the unique entries from your data.frame, as follows:

new_data <- extract_unique_references(data, matches)

That's riskier but also faster :)

I hope this helps! Let me know if you have more questions.

Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants