as.clickstreams {clickstream} | R Documentation |
Converts a character vector or a character list into a clickstream list.
Description
Converts a character vector or a character list into a clickstream list. Note that non-alphanumeric characters will be removed.
Usage
as.clickstreams(obj, sep = ",", header = TRUE)
Arguments
obj |
The character vector or character list which will be converted into a clickstream list. Each line of the vector must represent exactly one click stream. |
sep |
The character separating clicks (default is “,”). |
header |
A logical flag indicating whether the first entry of each entry in the character vector is the name of the clickstream. |
Value
A list of clickstreams. Each element is a vector of characters representing the clicks. The name of each list element is either extracted from the character vector or a unique number.
Author(s)
Michael Scholz michael.scholz@th-deg.de
See Also
print.Clickstreams
, randomClickstreams
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)
print(cls)
[Package clickstream version 1.3.3 Index]