Re: [R] Subtracting Data Frame With a Different Number of Rows

2020-04-21 Thread William Michels via R-help
Hi Phillip, You have two choices here: 1. Manually enter the missing rows into your individual.df using rbind(), and cbind() the overall.df and individual.df dataframes together (assuming the rows line up properly), or 2. Use merge() to perform an SQL-like "Left Join", and copy values from the "ov

[R] Subtracting Data Frame With a Different Number of Rows

2020-04-21 Thread Phillip Heinrich
I have two small data frames of baseball data. The first one is the mean number of runs that will score in each half inning for the 2018 Arizona Diamondbacks. The second data frame is the same information but for only one player. As you will see the individual player did not come up to bat a