powered by
replace the items of one object by another
replace_item(x, y, keep_extra = FALSE)
replaced object
number, character or list
another object, the class of y should be same as x
whether keep extra items in y
x <- list(A = 1, B = 3) y <- list(A = 9, C = 10) replace_item(x, y) replace_item(x, y, keep_extra = TRUE)
Run the code above in your browser using DataLab