I have a very large data frame where some values are associated to a factor, like this:
value user
12 USER1
4 USER5
6 USER3
50 USER1
2 USER2
1 USER1
8 USER5
9 USER3
55 USER1
15 USER2
I want to find out the max and min of the value for each user. I tried with a for loop, where I create a temp variable and find max and min there, going through the user list. However, the size of the database is quite big (100Mb) and it takes a really long time (30 mins). Is there a smarter way to do this? Thanks.