Open ecking opened 4 years ago
What do you get if you type:
d2 <- merge(Teams, d1, by = c("teamID" ,"yearID"), all=TRUE)
head( d2 )
Hmmm. It returns results which is a start but only 6 rows of data...? which is even more baffling to me.
head() prints first six rows, so that is as expected. You are assigning your new data frame to the object d2. All of your data should be accessible there. It is normal that any line that includes assignment will not print the results. You need to request it by typing the object name (or more typically some preview or summary of the object).
SUPER HELPFUL. I understand now.
THANK YOU!
Thanks @lecy!
Hello again,
So I merged Salaries and Teams. It looks fine. But if I go to define that new dataset it returns nothing... no error, not even a notice of zero results.. just blank, nothing.
d2 <- merge(Teams, d1, by = c("teamID" ,"yearID"), all=TRUE)
If I remove d2, I get the merged table and it looks fine. The reason why I was doing this was so I could use values from that table together so I could figure out the cost per win. Am I approaching this incorrectly?