I have data of movies and theaters such as:
Theater   , MovieGenre , MovieName , Ticket Sales 
A            Comedy           aa       100
A            Romance          bb        70
A            Action           cc        80
B            Comedy           aa        120
B            Romance          cc        90
B            Romance         dd         50
C            Comedy          aa         87
C            Comedy          ee         86
C            Action          cc         76
I'm trying to build a loop where it gives theater based ticket sales for example:
A 250
B 260
C 249 
I'm using subset:
Select = subset(data, Theater ==A) 
But it is making me put the theater alphabet everytime. How I can automate the process in building a vector.
 
     
    