fill_na | R Documentation |
Fill NA
s values from x
using values from fill
that in the same location.
Vector x
and fill
must have the same length.
fill_na(x, fill)
x |
Vector to fill |
fill |
A Vector whose elements will be retrieved to fill in |
A Vector with original element from x
and filled NA
from fill
v1 <- c(NA, NA, "a", NA, "b") # Trust v1
v2 <- c(NA, "c", "d","k", NA)
fill_na(v1, v2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.