Skip to content

Instantly share code, notes, and snippets.

@chiral
Created April 6, 2014 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chiral/10004609 to your computer and use it in GitHub Desktop.
Save chiral/10004609 to your computer and use it in GitHub Desktop.
library(dplyr)
#train <- read.csv("train.csv")
test <- read.csv("test_v2.csv")
last_items <- test %.%
group_by(customer_ID) %.%
filter(shopping_pt==max(shopping_pt)) %.%
mutate(plan=paste(A,B,C,D,E,F,G,sep='')) %.%
select(customer_ID,plan)
write.csv(last_items,"submit.csv",
row.names=F,quote=F)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment