Trim columns generated automatically during a merge of data sets that share non-"by" columns
Expects that duplicate column names are given the suffixes ".x" and ".y". The ".y" columns are dropped (thus, columns from the second data set in
merge(x, y)), and the suffix dropped from the name of the ".x" column.
The function also checks to make sure that the column being dropped has the same content as the column being retained. If the ".x" column had NA values where the ".y" column had non-NA's, then the ".x" column gets teh values of the ".y" column for those rows. If there are diffences between the two columns for non-NA cases, a
message is printed indicating as much.
A message is also printed if this function does not find any columns to trim.
NULL or nothing; however, has the side affect of change the content of
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.