-
Notifications
You must be signed in to change notification settings - Fork 25
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
batch-find-replace-merge solution #4
Comments
(This refers to https://github.com/noamross/zero-dependency-problems-r/blob/master/batch-find-replace-merge.md) Yes, in fact, the response to this on the listserv was BUT the tougher question is: How would someone who does NOT know this figure it out? I note that neither function is covered in the r-novice software carpentry lesson. And the questioner may not know that "merge" or "join" are technical terms for this type of operation. The questioner did do a good job of producing a reproducible example here, so that path to a solution may be the best one: produce an MRE and ask on a forum/listserv. Assuming the questioner doesn't know "merge" or "join" as formal concepts, they could search for "r combine data frames". On google, this gets you to
I also googled "r make new column with info from another data frame", which is one formulation someone might come up with if they are not explicitly thinking of this operation as "combining data". Here, the right solution shows up in the 6th result, which is the first page I found that doesn't assume the reader knows what "merge" means:
|
I also note that |
The questioner didn't frame things this way, but an experienced MS Excel user might think of this as a VLOOKUP operation. Googling "vlookup in r" gets you to the right answer. This suggests a search strategy: Do you know how you might do this in another program/language? If so, search for that, but "in R". |
There is some hope at least, that if they stumble upon dplyr (reasonable) -google gives me data manip with dplyr as the third result on google for the query The learn x in y series does mention merging, but it uses data.table. BTW, your readme isn't updating on github so I didn't notice your other goal of thinking about the novice path to finding, its odd that the readme file is different than what is displayed :-/ |
From your simple example isn't a reasonable solution:
or even just a simple merge for your 'dependecy-free' solution.
Is there something different about your more complex example that these solutions wouldn't work?
The text was updated successfully, but these errors were encountered: