Comments (5)
Code is incorporated into the chapter 'Prepare data'.
from mungbean_pm.
I have been adding this data grouping to the master branch in 04_Prep_data.rmd. I noted that with the code supplied in your md above allocated the control treatments to late clusters.
I updated this with the following code
slim_PM_dat[slim_PM_dat$fungicide_ai == "control", c("fungicide_timing_1", "fungicide_timing_2", "fungicide_timing_3","cluster_1", "cluster_2","cluster_3")] <- "control"
from mungbean_pm.
Ah, it did? Good catch.
I'm trying to follow where your code fits what I did?
from mungbean_pm.
I've fixed the code in my branch to address the issue.
from mungbean_pm.
I updated the clustering code in your branch to handle NA
values.
mb <-
mb %>%
mutate(
cluster_1 = case_when(
is.na(fungicide_timing_1) ~ NA_character_,
fungicide_timing_1 < 0 ~ "Early",
fungicide_timing_1 >= 0 &
fungicide_timing_1 < 4 ~ "Recommended",
fungicide_timing_1 > 4 ~ "Late"
)
) %>%
mutate(
cluster_2 = case_when(
is.na(fungicide_timing_2) ~ NA_character_,
fungicide_timing_2 < 13 ~ "Early",
fungicide_timing_2 >= 13 &
fungicide_timing_2 < 17 ~ "Recommended",
fungicide_timing_2 > 17 ~ "Late"
)
) %>%
mutate(
cluster_3 = case_when(
is.na(fungicide_timing_3) ~ NA_character_,
fungicide_timing_3 < 14 ~ "Early",
fungicide_timing_3 == 14 ~ "Recommended"
)
)
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.