I have a clickstream .csv
data file in this format :
Step_Name Session_ID
p-1 1
p-2 1
defer 1
p-1 2
p-3 2
buy 2
p-4 3
defer 3
I am trying to use clickstream
package in R for analysis. This package requires us to convert the above data into this format :
1 p-1 p-2 defer
2 p-1 p-3 buy
3 p-4 defer
where the first column is Session ID and number of columns may vary for each session depending on the number of steps the website user has taken. How do I get the initial data into the above format (in either excel or R)?
Also, if there are other ways to analyse clickstream data in R without such data manipulation, please let me know.