r - using arulesSequences package : Error in makebin(data, file) : 'sid' invalid -


i using arulessequences package in r. documentation little type of data read_baskets function receives. guess data should in text (.txt) format. column names are: "sequenceid", "eventid", "size" , "items". data has 200,000 rows , looks following in z.txt file:

1,1364,3,{12,17,19} 1,1130,4,{14,17,21,23} 1,1173,3,{19,23,9} 1,98,5,{14,15,2,21,5} 2,1878,4,{1,10,14,3} 2,1878,13,{1,12,14,15,16,17,18,19,2,21,24,25,5} 2,1878,1,{2} 

i tried use:

x <- read_baskets("z.txt", sep = ",",info =c("sequenceid","eventid","size")) s <- cspade(x,parameter = list(support = 0.001),control = list(verbose =  true),tmpdir = tempdir()) 

but error :

error in makebin(data, file) : 'sid' invalid

ok found problem, , i'm posting in case 1 has same problem. problem both sequenceid , eventid (first , second columns must ordered blockwise. package mentions point, ordered first column.


Comments