Comments (7)
@PaulMelloy, why is the data file that should be produced at the end of this Rmd imported at the head? That should not be happening.
from mungbean_pm.
@PaulMelloy, can you please provide some documentation for the fold_data()
? I'm still unclear as to why it's useful instead of using dplyr::*_join()
. Just looking at the code I'm really not understanding what it's purpose is.
from mungbean_pm.
The differences between the fold_data() and *_join functions are (in my mind) subtle and difficult to explain. Or I don't understand the *_join functions well enough.
The Join functions seem to add columns or rows which are not present in x that are present in y (and vice versa), i want to replace old data or NA data with the new values without changing the dimensions of my data.
The fold_data function matches rows from x and y based on specified (match) columns and replaces specific values in the column specified from y into x, without adding columns or rows.
it also checks if the value is the same as the replacement value and does not replace if they are the same. Then reports how many values were replaced in all the matched rows.
from mungbean_pm.
I think you want an outer join, https://www.dofactory.com/sql/left-outer-join, which is a semi_join()
in dplyr?
from mungbean_pm.
BTW, we don't have to change it as long as what you have works, but could you document the code a bit better using ROxygen syntax?
from mungbean_pm.
I've lost track and now I can't find this file. @PaulMelloy can you link to it? Is it this file, ExcludeBook_191115_PMMB_DataWrangling_PM.Rmd? Do we need it? Do I still need to complete a code review of it?
from mungbean_pm.
Ok, I made a mistake earlier on this thread.
You were asking about the fold_data() function and I answered with an explanation on the data_mesh() function. Sorry for the confusion.
The fold data function just re-arranges the columns so both data.frame have their columns in the same order. Then appends any unmatched columns of the non-template data_frame to the right side of the data frame and returns it.
The new data.frame will also contain columns present in the template data.frame which were not originally present in new_DataFrame. I have updated the description. however not in the Roxygen file. I am still learning about how to do this with packages.
You have already provided a code review of the file. However I think there are still some things that I need to check, and these have been listed at the top of the file
from mungbean_pm.
Related Issues (20)
- Matching vectors with NA values HOT 3
- Vignette datawrangling does not include all studies HOT 1
- Commenting code/chunk or documenting in Markdown HOT 1
- Issue with `same()` comparing value against vector, stops knitting HOT 3
- Reference not in .bib file HOT 1
- Three references are missing from the paper HOT 1
- Several references aren't peer reviewed HOT 1
- "..." in text? HOT 1
- Figure 2 only accounts for 365 days HOT 1
- Unable to knit the compendium, 05_AUDPC_MetaAnalysis.Rmd file. HOT 1
- Were two meta-analysis packages used? HOT 3
- The data wrangling vignette appears to still be incomplete and need checking HOT 3
- Defining dose categories HOT 1
- 03_Prep_data.Rmd won't knit HOT 1
- 04_MetaAnalysis.Rmd won't knit HOT 1
- 02_Preliminary_analysis won't knit HOT 57
- update github actions cecilapp to deploy with most recent version3
- Licence for compendium should be a CC not MIT
- Link to actual pub?
- Unable to rebuild book
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mungbean_pm.