Coalesce columns based on pattern in R [duplicate]
问题 This question already has answers here : Merge multiple variables in R (6 answers) Closed 9 months ago . I have combined data sets in R, and each data set may use a different column name for the same data. I need to use a regular expression to identify the names of the columns I need to combine, and then run that list of column names through coalesce. I know the proper regex expression to identify my columns, and I know how to manually write the column names into the coalesce function to