'matching values of 2 columns of different sizes in different files and returning corresponding value of third column of one of those files

I have workbook with an overview file which contains information about each trial


    Trial   | date| time| call| social status
    Trial001 xxx   xxx    y     Single alone
    Trial002 xxx   xxx    n     pair with partner
    Trial003 xxx   xxx    n     pair with partner

and one workbook with a file containing different behaviours per individual (in rows) per trial. (different subjects between trials but due to BORIS all called F1)


    Subject | Trial    | behavior | total count | mean duration (S) | stdv 
    F1      | Trial001 | jump     | 1           | 5                 | stdv
    F1      | Trial001 | walk     | 2           | 10                | stdv
    F1      | Trial002 | jump     | 3           | 10                | stdv
    F1      | Trial002 | walk     | 3           | 10                | stdv
    F1      | Trial002 | no view  | 3           | 50                | stdv

Now i want to make a column in the behaviour file containing the social status mentioned in the corresponding overview trial.

I thought left_join would fix my issue but when i try this it gives me an error saying it need ~name or it returns my entire mutating join code to my console instead of filling the column.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source