I have 2 data frames, i want apply aggregate from all data frame, my data is very large, so.. suppose my data is like:
data1
ID Name
1 A
2 B
3 C
4 D
5 E
6 F
data2
ID Age
1 4
2 5
3 12
4 53
5 2
6 8
after apply aggregate function, i want these result:
data_result
ID Name Age
1 A 4
2 B 5
3 C 12
4 D 53
5 E 2
6 F 8
small notes:
- data frame not have same length ( rows and cols ).
i was try to use group by function, but not work, show me this error:
Error in UseMethod("group_by_") : no applicable method for 'group_by_' applied to an object of class "character"
I don't need all columns from data frame, just 2 column for each one of them.
these task is very easy to implement in excel, but in r ???
any one can help me ?
Thanks