how to use merge() to update a table in R

前端 未结 6 702
孤独总比滥情好
孤独总比滥情好 2020-11-27 20:47

I\'m trying to figure out how to use merge() to update a database.

Here is an example. Take for example the data frame foo



        
6条回答
  •  余生分开走
    2020-11-27 21:45

    merge() only merges in new data. For instance, if you had a data set of average income for a few cities, and a separate data set of the populations of those cities, you would use merge() to merge in one set of data into the other.

    Like apeescape said, replace() is probably what you want.

提交回复
热议问题