writeClickstreams {clickstream} | R Documentation |
Writes a List of Clickstreams to File
Description
Writes a list of clickstream to a csv-file.
Usage
writeClickstreams(
clickstreamList,
file,
header = TRUE,
sep = ",",
quote = TRUE
)
Arguments
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 |
Author(s)
Michael Scholz michael.scholz@th-deg.de
See Also
readClickstreams
, clusterClickstreams
Examples
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")
[Package clickstream version 1.3.3 Index]