Posted By

gregdingle on 03/29/09


Tagged

PayPal


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


plot and aggregate paypal report


 / Published in: R
 

Use with output from https://history.paypal.com/us/cgi-bin/webscr?cmd=_history-download

  1. data = subset(data, select=c(Date, Name, Type, Status, Gross, Fee, Net, From.Email.Address))
  2. data = subset(data, Type != 'Withdraw Funds to a Bank Account')
  3.  
  4. d = strptime(data$Date, '%m/%d/%Y')
  5. mon = strftime(d, format='%y-%m')
  6.  
  7. sums = tapply(data$Net, mon, sum)
  8.  
  9. barplot(sums, main='Paypal net by month')
  10.  
  11. aggregate(data$Net, list('month'=data$mon, 'type'=data$Type), sum)

Report this snippet  

You need to login to post a comment.