replmiss | R Documentation |
Function to replace missing (NA
) values in a vector.
replmiss(x, y, data)
x |
vector that may include one or more missing values. |
y |
either a scalar or a vector of the same length as |
data |
optional data frame containing the variables given to the arguments above. |
Vector x
with the missing values replaced based on the scalar or vector y
.
Wolfgang Viechtbauer (wvb@metafor-project.org, https://www.metafor-project.org).
x <- c(4,2,7,NA,1,NA,5)
x <- replmiss(x,0)
x
x <- c(4,2,7,NA,1,NA,5)
y <- c(2,3,6,5,8,1,2)
x <- replmiss(x,y)
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.