R -- the merge functions

Inner join:

Keep only when both datasets provide the data for the subject/row

merge(x=demographics, y=shipping,
by.x = name, by.y="name")

merge(x= demographics, y= shipping,
by="name")

#merge another way
#full join
kaz1<- merge(x=old,y=new, by ="STUID", all=TRUE) #left join kaz2<- merge(x=old,y=new, by ="STUID", all.x=TRUE)

Leave a Reply