powered by
merge method for sf and data.frame object
# S3 method for sf merge(x, y, ...)
object of class sf
sf
object of class data.frame
data.frame
arguments passed on to merge.data.frame
merge.data.frame
a = data.frame(a = 1:3, b = 5:7) st_geometry(a) = st_sfc(st_point(c(0,0)), st_point(c(1,1)), st_point(c(2,2))) b = data.frame(x = c("a", "b", "c"), b = c(2,5,6)) merge(a, b) merge(a, b, all = TRUE)
Run the code above in your browser using DataLab