0

I have the following code for two data frames I am working on.

DF_TEAMS_TOTAL_SALARY_2017 = data.frame(TEAMS_TOTAL_SALARY_2017)
clubs_df = sort(unique(complete_dataset$club))
clubs_df = data.frame(clubs_df)

I am trying to merge them since the order of the records are good and I want to have a table with the Clubs and the Total Salary of 2017. However, when I do the merge function or rbind the table I get has multiple records of the CLUB with the first value of the DF_TEAMS_TOTAL_SALARY_2017 tenter image description here

The rest of the values in TEAMS_TOTAL_SALARY_2017 doesn't show up.

  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Please [do not post code or data in images](https://meta.stackoverflow.com/q/285551/2372064) – MrFlick Mar 06 '23 at 17:44
  • What I did was to before creating both vectors into a data.frama and then do merge(df,df2) I did df3 = data.frame(vector1,vector2). – Daniel Isaac Chavez Mar 06 '23 at 18:28

0 Answers0