[Traminer-users] Error in seqefsub

Aron Lindberg aron.lindberg at case.edu
Tue Mar 3 22:52:42 CET 2015


Hi,


I’m trying to run code along these lines:


required_packages <- c('TraMineR','TraMineRextras','magrittr', 'dplyr', ‘rmarkdown’, ‘devtools')
new_packages <- required_packages[!(required_packages %in% installed.packages()[,'Package'])]
if(length(new_packages)) install.packages(new_packages)
lapply(required_packages, library, character.only=T)


set.seed(1)
setwd("/home/rstudio/crowd_sequencing")
data <- read.csv(paste0(getwd(), "/data/dataset_error.csv"), header=TRUE)

data <- subset(data, select = c("SequenceIndex", "PostOrder", "Category"))
colnames(data) <- c("id", "time", "event")
data$end <- data$time
data <- data[with(data, order(time)), ]
data$time <- match(data$time, unique(data$time))
data$end <- match(data$end, unique(data$end))
data.sample <- data
# data.sample = data[sample(nrow(data), nrow(data)*0.01), ]
data.sample <- data.sample[order(data.sample$id), ]
data.seqe <- seqecreate(data = data.sample, id = id, timestamp = time, 
                        event = event)


# Frequent subsequences:
fsubseq <- seqefsub(data.seqe, pMinSupport = 0.65, maxK = 3)


However, this generates:


Error in class(ret$subseq) <- c("seqelist", "list") : 
  attempt to set an attribute on NULLwhich is surprising because everything seems fine up until the fsubseq function is called.I’ve put the full dataset here:
https://gist.github.com/aronlindberg/0421ca91dd598f74017e



Best,
Aron


-- 
Aron Lindberg


Doctoral Candidate, Information Systems
Weatherhead School of Management 
Case Western Reserve University
aronlindberg.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20150303/e2633874/attachment.html>


More information about the Traminer-users mailing list