left_join R dataframes, merging two columns with NAs
问题 My problem is the following: Lets say I have an existing dataframe with the following columns: UID, foo, result. Result is already partially filled. A second model now predicts additional rows, generating a second dataframe containing a UID and a result column: (Code to reproduce at bottom) ## df_main ## UID foo result ## <dbl> <chr> <chr> ## 1 1 moo Cow ## 2 2 rum <NA> ## 3 3 oink <NA> ## 4 4 woof Dog ## 5 5 hiss <NA> ## new_prediction ## UID result ## <dbl> <chr> ## 1 3 Pig ## 2 5 Snake I