writeClickstreams | R Documentation |
Writes a list of clickstream to a csv-file.
writeClickstreams(
clickstreamList,
file,
header = TRUE,
sep = ",",
quote = TRUE
)
clickstreamList |
The list of clickstreams to be written. |
file |
The name of the file which the clickstreams are written to. |
header |
A logical flag indicating whether the name of each clickstream element should be used as first element. |
sep |
The character used to separate clicks (default is “,”). |
quote |
A logical flag indicating whether each element of a clickstream
will be surrounded by double quotes (default is |
Michael Scholz michael.scholz@th-deg.de
readClickstreams
, clusterClickstreams
clickstreams <- c("User1,h,c,c,p,c,h,c,p,p,c,p,p,o",
"User2,i,c,i,c,c,c,d",
"User3,h,i,c,i,c,p,c,c,p,c,c,i,d",
"User4,c,c,p,c,d",
"User5,h,c,c,p,p,c,p,p,p,i,p,o",
"User6,i,h,c,c,p,p,c,p,c,d")
cls <- as.clickstreams(clickstreams, header = TRUE)
clusters <- clusterClickstreams(cls, order = 0, centers = 2)
writeClickstreams(cls, file = "clickstreams.csv", header = TRUE, sep = ",")
# Remove the clickstream file
unlink("clickstreams.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.