Assume I tracked the behavior of users when they visit a Website. In detail I track the movement from which site to site they click within the Website. So I have a lot of tuples with (userID, site, time). Now I want to visualize if there are any patterns or clusters for the movement. Let's say most of the users click step by step through the Website, and another group visits site 1 then site 2, then they go back to 1 and then to 2 and then to site 3.
What method can I use to classify the behavior?
a<-as.POSIXlt("2013-07-01 00:30:00")
b<-as.POSIXlt("2013-07-29 00:30:00")
aI<-as.numeric(a)
bI<-as.numeric(b)
times<-sample(seq(aI,bI,by=2),10000)
t<-sort(times)
class(t)<-c("POSIXt","POSIXct")
id<-seq(1,10050,20)
userID<-1
for(i in 1:200){
userID<-c(userID,sample(id[i]:id[i+1],50,replace=T))
}
userID<-userID[1:10000]
movement<-list(LETTERS[1:20],c("A","B","A","B","C","D","E","F","G","H","I")
,c("A","B","C","B","C","D","E","D","C","D","E")
,c("C","B","C","D","E","F","G","H","I","I"))
site<-character(10000)
for(i in unique(userID)){
p<-sample(movement,1)[[1]]
site[userID==i]<-p[1:length(userID[userID==i])]
}
table<-data.frame(userID=userID,site=site,time=t)