<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<span id="mailbox-conversation"><div>Hi,</div>
<div><br></div>
<div>I’m trying to run code along these lines:</div>
<div><br></div>
<div>
<div>required_packages <- c('TraMineR','TraMineRextras','magrittr', 'dplyr', ‘rmarkdown’, ‘devtools')</div>
<div>new_packages <- required_packages[!(required_packages %in% installed.packages()[,'Package'])]</div>
<div>if(length(new_packages)) install.packages(new_packages)</div>
<div>lapply(required_packages, library, character.only=T)</div>
<div><br></div>
<div>set.seed(1)</div>
<div>setwd("/home/rstudio/crowd_sequencing")</div>
<div>data <- read.csv(paste0(getwd(), "/data/dataset_error.csv"), header=TRUE)<br>
</div>
<div>data <- subset(data, select = c("SequenceIndex", "PostOrder", "Category"))</div>
<div>colnames(data) <- c("id", "time", "event")</div>
<div>data$end <- data$time</div>
<div>data <- data[with(data, order(time)), ]</div>
<div>data$time <- match(data$time, unique(data$time))</div>
<div>data$end <- match(data$end, unique(data$end))</div>
<div>data.sample <- data</div>
<div># data.sample = data[sample(nrow(data), nrow(data)*0.01), ]</div>
<div>data.sample <- data.sample[order(data.sample$id), ]</div>
<div>data.seqe <- seqecreate(data = data.sample, id = id, timestamp = time, </div>
<div>                        event = event)</div>
<div><br></div>
<div># Frequent subsequences:</div>
<div id="mb-reply">fsubseq <- seqefsub(data.seqe, pMinSupport = 0.65, maxK = 3)</div>
<div id="mb-reply"><br></div>
<div id="mb-reply">However, this generates:</div>
<div id="mb-reply"><br></div>
<div id="mb-reply">
<pre id="mb-reply">Error in class(ret$subseq) <- c("seqelist", "list") : 
  attempt to set an attribute on NULL</pre>
<pre id="mb-reply">which is surprising because everything seems fine up until the fsubseq function is called.</pre>
<pre id="mb-reply">I’ve put the full dataset here:</pre>
</div>
<div id="mb-reply">https://gist.github.com/aronlindberg/0421ca91dd598f74017e<br>
</div>
<div id="mb-reply"><br></div>
<div id="mb-reply">Best,</div>
<div id="mb-reply">Aron</div>
</div></span><div class="mailbox_signature">
<br><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);">-- </div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);">Aron Lindberg</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);"><br></div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);">Doctoral Candidate, Information Systems</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);">Weatherhead School of Management </div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);">Case Western Reserve University</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);">aronlindberg.github.io</div>
</div>
</body></html>