Running ‘Rgui.R’
  Running ‘arules.R’
  Comparing ‘arules.Rout’ to ‘arules.Rout.save’ ... OK
  Running ‘idlists.R’
  Running ‘makebin.R’
  Comparing ‘makebin.Rout’ to ‘makebin.Rout.save’ ... OK
  Running ‘native.R’
  Comparing ‘native.Rout’ to ‘native.Rout.save’ ... OK
  Running ‘ptree.R’
  Running ‘similarity.R’
  Running ‘zaki.R’
Running the tests in ‘tests/idlists.R’ failed.
Complete output:
  > 
  > ### ceeboo 2015
  > 
  > library("arulesSequences")
  Loading required package: arules
  Loading required package: Matrix
  
  Attaching package: 'arules'
  
  The following objects are masked from 'package:base':
  
      abbreviate, write
  
  > 
  > .string2sequences <-
  + function(x) {
  +     x <- lapply(strsplit(x, split = " "), strsplit, split = "")
  +     x <- unlist(x, recursive = FALSE)
  +     as(x, "sequences")
  + }
  > 
  > ## repeating
  > t <- paste(
  +     1, 
  +     c(10, 15, 18, 19), 
  +     c("A", "A", "A", "A"),
  +     collapse = "\n"
  + )
  > t <- textConnection(t)
  > t <- read_baskets(t, info = c("sequenceID", "eventID"))
  > as(t, "data.frame")
    items sequenceID eventID
  1   {A}          1      10
  2   {A}          1      15
  3   {A}          1      18
  4   {A}          1      19
  > 
  > ## The second pattern has two matches starting at 10 and 15
  > ## extending over 8 and 4 time periods. 
  > s <- c("A AAA")
  > s <- .string2sequences(s)
  > 
  > k <- 
  + list(
  +     list(parameter = list()),
  +     ## Test if cummulation of gaps works.
  +     list(parameter = list(maxwin = 5))
  + )
  > 
  > k <- mapply(function(x)
  +     support(s, t, control = x),
  +     k
  + )
  > 
  > cbind(as(s, "data.frame"), support = k)
         sequence support.1 support.2
  1         <{A}>         1         1
  2 <{A},{A},{A}>         1         1
  > 
  > ## Test if optimization works.
  > s <- c("A AB")
  > s <- .string2sequences(s)
  > ## IGNORE_RDIFF_BEGIN
  > k <- support(s, t, control = list(verbose = TRUE, parameter = list()))
  using method: idlists 
  
  parameter specification:
  support : NA
  maxsize : NA
  maxlen  : NA
  
  preprocessing ... P [0.01s]
  counting ... 2 sequence(s), processed 0/1 join(s) [0.00s]
  > ## IGNORE_RDIFF_END
  > cbind(as(s, "data.frame"), support = k)
     sequence support
  1     <{A}>       1
  2 <{A},{B}>       0
  > 
  > ## Test if conversion works.
  > all.equal(k, support(s, as(t, "timedsequences"),
  + 		     control = list(parameter = list())))
  Error in validObject(.Object) : 
    invalid class "ngCMatrix" object: invalid object for slot "i" in class "ngCMatrix": got class "logical", should be or extend class "integer"
  Calls: all.equal ... initialize -> callNextMethod -> .nextMethod -> validObject
  In addition: Warning message:
  In Ops.factor(c(t), 1L) : '-' not meaningful for factors
  Execution halted
Running the tests in ‘tests/ptree.R’ failed.
Complete output:
  > 
  > ### ceeboo 2015
  > 
  > library("arulesSequences")
  Loading required package: arules
  Loading required package: Matrix
  
  Attaching package: 'arules'
  
  The following objects are masked from 'package:base':
  
      abbreviate, write
  
  > 
  > ## use example
  > data(zaki)
  > ## IGNORE_RDIFF_BEGIN
  > s7 <- cspade(zaki, parameter = list(support = .25), 
  + 	           control   = list(verbose = TRUE, tidLists = TRUE))
  
  parameter specification:
  support : 0.25
  maxsize :   10
  maxlen  :   10
  
  algorithmic control:
  bfstype  : FALSE
  verbose  :  TRUE
  summary  : FALSE
  tidLists :  TRUE
  
  preprocessing ... 1 partition(s), 0 MB [0.13s]
  mining transactions ... 0.11 MB [0.11s]
  reading sequences ... [2.1s]
  
  total elapsed time: 2.354s
  > ## IGNORE_RDIFF_END
  > 
  > ## IGNORE_RDIFF_BEGIN
  > k <- support(s7, zaki, control = list(verbose = TRUE))
  preprocessing ... Error in validObject(.Object) : 
    invalid class "ngCMatrix" object: invalid object for slot "i" in class "ngCMatrix": got class "logical", should be or extend class "integer"
  Calls: support ... initialize -> callNextMethod -> .nextMethod -> validObject
  In addition: Warning message:
  In Ops.factor(c(t), 1L) : '-' not meaningful for factors
  Execution halted
Running the tests in ‘tests/similarity.R’ failed.
Complete output:
  > 
  > library("arulesSequences")
  Loading required package: arules
  Loading required package: Matrix
  
  Attaching package: 'arules'
  
  The following objects are masked from 'package:base':
  
      abbreviate, write
  
  > 
  > ### ceeboo 2008, 2016
  > 
  > data(zaki)
  > 
  > z <- as(zaki, "timedsequences")
  Error in validObject(.Object) : 
    invalid class "ngCMatrix" object: invalid object for slot "i" in class "ngCMatrix": got class "logical", should be or extend class "integer"
  Calls: as ... initialize -> callNextMethod -> .nextMethod -> validObject
  In addition: Warning message:
  In Ops.factor(c(t), 1L) : '-' not meaningful for factors
  Execution halted
Running the tests in ‘tests/zaki.R’ failed.
Complete output:
  > 
  > library("arulesSequences")
  Loading required package: arules
  Loading required package: Matrix
  
  Attaching package: 'arules'
  
  The following objects are masked from 'package:base':
  
      abbreviate, write
  
  > 
  > ## basic tests using the small running 
  > ## example from the paper. 
  > ##
  > ## ceeboo 2007, 2014, 2015, 2016
  > 
  > ## data set
  > 
  > data(zaki)
  > 
  > zaki.txt <- 
  +     read_baskets(con  = system.file("misc", "zaki.txt", 
  +                                     package = "arulesSequences"),
  +                  info = c("sequenceID","eventID","SIZE"))
  > 
  > all.equal(zaki, zaki.txt)
  [1] TRUE
  > 
  > ## methods of class sequences
  > 
  > ## IGNORE_RDIFF_BEGIN
  > s1 <- cspade(zaki, parameter = list(support = 0.4), 
  +                    control   = list(verbose =TRUE))
  
  parameter specification:
  support : 0.4
  maxsize :  10
  maxlen  :  10
  
  algorithmic control:
  bfstype  : FALSE
  verbose  :  TRUE
  summary  : FALSE
  tidLists : FALSE
  
  preprocessing ... 1 partition(s), 0 MB [0.13s]
  mining transactions ... 0 MB [0.027s]
  reading sequences ... [0.042s]
  
  total elapsed time: 0.203s
  > ## IGNORE_RDIFF_END
  > s1
  set of 18 sequences 
  > s2 <- cspade(zaki, parameter = list(support = 0.4, maxsize = 2, maxlen = 2))
  > s2
  set of 14 sequences 
  > 
  > nitems(s1)
  [1] 4
  > nitems(s1, itemsets = TRUE)
  [1] 8
  > nitems(s2)
  [1] 4
  > nitems(s2, itemsets = TRUE)
  [1] 7
  > labels(s1, setSep = "->", seqStart = "", seqEnd = "")
   [1] "{A}"             "{B}"             "{D}"             "{F}"            
   [5] "{A,F}"           "{B,F}"           "{D}->{F}"        "{D}->{B,F}"     
   [9] "{A,B,F}"         "{A,B}"           "{D}->{B}"        "{B}->{A}"       
  [13] "{D}->{A}"        "{F}->{A}"        "{D}->{F}->{A}"   "{B,F}->{A}"     
  [17] "{D}->{B,F}->{A}" "{D}->{B}->{A}"  
  > summary(s1)
  set of 18 sequences with
  
  most frequent items:
        A       B       F       D (Other) 
       11      10      10       8      28 
  
  most frequent elements:
      {A}     {D}     {B}     {F}   {B,F} (Other) 
        8       8       4       4       4       3 
  
  element (sequence) size distribution:
  sizes
  1 2 3 
  8 7 3 
  
  sequence length distribution:
  lengths
  1 2 3 4 
  4 8 5 1 
  
  summary of quality measures:
      support      
   Min.   :0.5000  
   1st Qu.:0.5000  
   Median :0.5000  
   Mean   :0.6528  
   3rd Qu.:0.7500  
   Max.   :1.0000  
  
  includes transaction ID lists: FALSE 
  
  mining info:
   data ntransactions nsequences support
   zaki            10          4     0.4
  > inspect(s1)
      items support 
    1 <{A}>    1.00 
    2 <{B}>    1.00 
    3 <{D}>    0.50 
    4 <{F}>    1.00 
    5 <{A,   
        F}>    0.75 
    6 <{B,   
        F}>    1.00 
    7 <{D},  
       {F}>    0.50 
    8 <{D},  
       {B,   
        F}>    0.50 
    9 <{A,   
        B,   
        F}>    0.75 
   10 <{A,   
        B}>    0.75 
   11 <{D},  
       {B}>    0.50 
   12 <{B},  
       {A}>    0.50 
   13 <{D},  
       {A}>    0.50 
   14 <{F},  
       {A}>    0.50 
   15 <{D},  
       {F},  
       {A}>    0.50 
   16 <{B,   
        F},  
       {A}>    0.50 
   17 <{D},  
       {B,   
        F},  
       {A}>    0.50 
   18 <{D},  
       {B},  
       {A}>    0.50 
   
  > 
  > data.frame(items  = itemLabels(s1), 
  +            counts = itemFrequency(s1))
    items counts
  1     A     11
  2     B     10
  3     D      8
  4     F     10
  > data.frame(items  = itemLabels(s2),
  +            counts = itemFrequency(s2)) 
    items counts
  1     A      7
  2     B      7
  3     D      5
  4     F      7
  > data.frame(itemsets = itemLabels(s2, itemsets = TRUE),
  +            counts   = itemFrequency(s2, itemsets = TRUE))
    itemsets counts
  1      {A}      5
  2      {B}      3
  3      {D}      5
  4      {F}      3
  5    {A,F}      1
  6    {B,F}      3
  7    {A,B}      1
  > 
  > as(s2, "data.frame")
        sequence support
  1        <{A}>    1.00
  2        <{B}>    1.00
  3        <{D}>    0.50
  4        <{F}>    1.00
  5      <{A,F}>    0.75
  6      <{B,F}>    1.00
  7    <{D},{F}>    0.50
  8  <{D},{B,F}>    0.50
  9      <{A,B}>    0.75
  10   <{D},{B}>    0.50
  11   <{B},{A}>    0.50
  12   <{D},{A}>    0.50
  13   <{F},{A}>    0.50
  14 <{B,F},{A}>    0.50
  > 
  > sequenceInfo(s2) <- sequenceInfo(s2)
  > sequenceInfo(s2)
  data frame with 0 columns and 0 rows
  > 
  > itemInfo(s2) <- itemInfo(s2)
  > itemInfo(s2)
    labels
  1      A
  2      B
  3      D
  4      F
  > 
  > ## fixme?
  > t <- itemTable(s2)
  > rownames(t) <- 
  + itemLabels(s2)[as.integer(rownames(t))]
  > t
       counts
  items 1
      A 7
      B 7
      D 5
      F 7
  > t <- itemTable(s2, itemsets = TRUE)
  > rownames(t) <- 
  + itemLabels(s2, itemsets = TRUE)[as.integer(rownames(t))]
  > t
          counts
  itemsets 1
     {A}   5
     {B}   3
     {D}   5
     {F}   3
     {A,F} 1
     {B,F} 3
     {A,B} 1
  > 
  > 
  > d1 <- as(s1, "data.frame")
  > d1$size    <- size(s1)
  > d1$length  <- size(s1, type = "length")
  > d1$ritems  <- ritems(s1, "max")
  > d1$maximal <- is.maximal(s1)
  > d1
            sequence support size length ritems maximal
  1            <{A}>    1.00    1      1      1   FALSE
  2            <{B}>    1.00    1      1      1   FALSE
  3            <{D}>    0.50    1      1      1   FALSE
  4            <{F}>    1.00    1      1      1   FALSE
  5          <{A,F}>    0.75    1      2      1   FALSE
  6          <{B,F}>    1.00    1      2      1   FALSE
  7        <{D},{F}>    0.50    2      2      1   FALSE
  8      <{D},{B,F}>    0.50    2      3      1   FALSE
  9        <{A,B,F}>    0.75    1      3      1    TRUE
  10         <{A,B}>    0.75    1      2      1   FALSE
  11       <{D},{B}>    0.50    2      2      1   FALSE
  12       <{B},{A}>    0.50    2      2      1   FALSE
  13       <{D},{A}>    0.50    2      2      1   FALSE
  14       <{F},{A}>    0.50    2      2      1   FALSE
  15   <{D},{F},{A}>    0.50    3      3      1   FALSE
  16     <{B,F},{A}>    0.50    2      3      1   FALSE
  17 <{D},{B,F},{A}>    0.50    3      4      1    TRUE
  18   <{D},{B},{A}>    0.50    3      3      1   FALSE
  > 
  > as(s1@elements, "data.frame")
       items support
  1      {A}    1.00
  2      {B}    1.00
  3      {D}    0.50
  4      {F}    1.00
  5    {A,F}    0.75
  6    {B,F}    1.00
  9  {A,B,F}    0.75
  10   {A,B}    0.75
  > 
  > d1[s1 %in%  c("D", "F"), 1:2]
            sequence support
  3            <{D}>    0.50
  4            <{F}>    1.00
  5          <{A,F}>    0.75
  6          <{B,F}>    1.00
  7        <{D},{F}>    0.50
  8      <{D},{B,F}>    0.50
  9        <{A,B,F}>    0.75
  11       <{D},{B}>    0.50
  13       <{D},{A}>    0.50
  14       <{F},{A}>    0.50
  15   <{D},{F},{A}>    0.50
  16     <{B,F},{A}>    0.50
  17 <{D},{B,F},{A}>    0.50
  18   <{D},{B},{A}>    0.50
  > d1[s1 %ain% c("D", "F"), 1:2]
            sequence support
  7        <{D},{F}>     0.5
  8      <{D},{B,F}>     0.5
  15   <{D},{F},{A}>     0.5
  17 <{D},{B,F},{A}>     0.5
  > d1[s1 %pin% "D", 1:2]
            sequence support
  3            <{D}>     0.5
  7        <{D},{F}>     0.5
  8      <{D},{B,F}>     0.5
  11       <{D},{B}>     0.5
  13       <{D},{A}>     0.5
  15   <{D},{F},{A}>     0.5
  17 <{D},{B,F},{A}>     0.5
  18   <{D},{B},{A}>     0.5
  > 
  > as(subset(s1, x %ain% c("D", "F")), "data.frame")
            sequence support
  7        <{D},{F}>     0.5
  8      <{D},{B,F}>     0.5
  15   <{D},{F},{A}>     0.5
  17 <{D},{B,F},{A}>     0.5
  > as(subset(s1, support == 1), "data.frame")
    sequence support
  1    <{A}>       1
  2    <{B}>       1
  4    <{F}>       1
  6  <{B,F}>       1
  > 
  > match(s2,s1)
   [1]  1  2  3  4  5  6  7  8 10 11 12 13 14 16
  > match(s1,s2)
   [1]  1  2  3  4  5  6  7  8 NA  9 10 11 12 13 NA 14 NA NA
  > 
  > # problem with new-style S4
  > # and rbind of data.frame()
  > s <- unique(c(s1,s2))           # uses duplicated
  > match(s1, s)
   [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
  > all.equal(s1, s)
  [1] TRUE
  > 
  > all.equal(s1, c(s[1], s1[-1]))  # test info
  [1] TRUE
  > 
  > all.equal(quality(s1)$support, support(s1, zaki))
  Error in validObject(.Object) : 
    invalid class "ngCMatrix" object: invalid object for slot "i" in class "ngCMatrix": got class "logical", should be or extend class "integer"
  Calls: all.equal ... initialize -> callNextMethod -> .nextMethod -> validObject
  In addition: Warning message:
  In Ops.factor(c(t), 1L) : '-' not meaningful for factors
  Execution halted