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

Adding an index_toUUID function #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ElliottMess
Copy link

No description provided.

ElliottMess added 2 commits September 4, 2020 10:09
This function helps linking the results from cleaninginspectoR to the  original dataset inspected by using an unique identifier.
@mabafaba
Copy link
Collaborator

mabafaba commented Sep 22, 2020

just FYI we originally had this functionality embedded within each function, then took it out and generalised it to:

inspection_add_data_columns<-function(inspection,df,variables){

so for uuids it would be:

inspection_add_data_columns(inspection_output, original_data, "uuid")

Your code looks much safer though (all the checks etc. & using dplyr to join); maybe it can be generalised and put inside inspection_add_data_columns, and then just add a wrapper that's specific to uuids?

We had an intention to keep cleaninginspectoR not kobo specific which made sense to me but i don't have any emotional attachment to that in any case! Do what's useful to you obviously (:

edit: I'm seeing that we never exported that function apparently (?).. not sure (:

@ElliottMess
Copy link
Author

Good to know that the function already exists, I missed it indeed (I didn't look for it either). I am modifying my pull request with your suggestion.

I don't think the concept of UUID is unique to kobo either. Most survey and other cases where I can see cleaninginspectoR be used would include some level of unique identifier. You also somehow recognize that by having 2 functions that look for duplicates in UUIDs essentially (:

I guess the issues I was trying to fix was somewhere else though. The inspecting functions return the row number as the index as the unique identifier, which is fine when no unique identifier is inputed, but some functions (including the wrapper inspect_all) do take an UUID variable inputed by the user. If that's the case, in my opinion, the UUID column should be included in the output.

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

Successfully merging this pull request may close these issues.

2 participants