overwrite | R Documentation |
overwrite()
rbind()
s the data frames lhs
and rhs
,
removing any duplicate lines, which are determined without regard to the
columns in except
.
overwrite(lhs, rhs, except = "value")
lhs |
data frame with values that will replace others |
rhs |
data frame with values that will be replaced |
except |
names of columns that will not be considered in determining which columns to replace; defaults to "value" |
data frame in which rows from rhs have been replaced with rows from lhs
Michaja Pehl
require(dplyr)
data <- data.frame(expand.grid(UPPER = LETTERS[1:2],
lower = letters[24:26]),
value = 1:6)
data
data %>%
filter(lower == "y") %>%
mutate(value = value * 10) %>%
overwrite(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.