plot and aggregate paypal report


/ Published in: R
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.