Description Usage Arguments Value Examples
This function proceeds a left join (dplyr packages) and fills missing values of the 'by variable' with a given value (instead of the default NA). Importantly, the other valid NA values are preserved. BUT only for the data.frame on the left side! NOTE: dplyr and tidyr package are needed!
1 | left_join_fill(x, y, by, fill = 0)
|
x |
- the left data.frame where the NAs are perserved |
y |
- the right data.frame wherre NA values can occur due to the join. CAUTION valid NAs get also replaced by the fill value! |
by |
- the by variable to join the data.frames |
fill |
- custom fill value to replace the default NA in dplyrs join function |
the joined data.frame with filled 0 values
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.