Hello,<div><br></div><div>I'm having problems getting started with my data, and am very new to both R and to TraMineR. I hope someone can help.<br><div><br></div><div>Relevant columns in my csv file are WorkgroupID (e.g., 65472), Start and Stop times (e.g., 11/28/11 9:37 AM), and StepNumber (e.g., "4.5").</div>
<div><br></div><div>After reading in my data, this is what I did:</div><div><br></div><div><div>> WorkgroupID_factor <- factor(d$WorkgroupID)</div><div>> StepNumber_factor <- factor(d$StepNumber)</div><div>> d <- data.frame(d, WorkgroupID_factor, StepNumber_factor)</div>
</div><div><br></div><div>I figured I should treat this as SPELL formatted data, so I did this:</div><div><br></div><div><div>> d.labels <- seqstatl(d$StepNumber_factor)</div><div>> d.states <- 1:length(d.labels)</div>
<div><br></div><div>But I get error messages when I do this:</div><div>> d.seq <- seqdef(d, var = c("WorkgroupID_factor", "StartTime", "StopTime", "StepNumber_factor"), informat = "SPELL", states = d.states, labels = d.labels, process = FALSE)</div>
<div><br></div><div>Error in Summary.factor(c(NA_integer_, NA_integer_, NA_integer_, NA_integer_, : </div><div> min not meaningful for factors</div><div>In addition: Warning messages:</div><div>1: In Ops.factor(begincolumn, 1) : < not meaningful for factors</div>
<div>2: In Ops.factor(endcolumn, begincolumn) : - not meaningful for factors</div><div>3: In Ops.factor(begincolumn, 0) : > not meaningful for factors</div></div><div><br></div><div>Abandoning that, I then tried treating my data as though it were in TSE format. I'm not sure if that's proper thing to do...</div>
<div>d.seqe <- seqecreate(id = d$WorkgroupID_factor, timestamp = d$StartTime, event = d$StepNumber_factor)</div><div><br></div><div>This works, although I'm still unsure about how to read it:</div><div><div>> print(d.seqe[2]) #Displays the sequence of events</div>
<div>[1] 67.00-(1.1)-2.00-(1.2)-3.00-(1.3)-3.00-(1.4)-2.00-(1.5)-2.00-(1.4)-3.00-(1.5,1.5,1.6)-198.00-(1.6)-1.00-(1.5,1.5,1.6)-1.00-(1.4,1.4,1.5)-2.00-(2.1,2.3)-4.00-(2.3,2.3)-1.00-(2.3,2.3,2.3,2.4)-1.00-(2.3,2.3,2.4)-3.00-(2.3,2.3)-3.00-(2.3)-7.00-(2.3,2.4)-9.00-(2.3,2.4,2.4)-167.00-(2.4,2.4,2.5,2.6)-(...)</div>
</div><div><br></div><div><div>But when I run this command, R hangs and I have to force quit and restart:</div><div>d.fsubseq <- seqefsub(d.seqe, minSupport = 50)</div><div><br></div><div><br></div><div>I hope someone can point out what I'm doing wrong. Thanks for any assistance!</div>
<div>
<div><br></div>-- <br>Camillia<br><br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><a href="http://sites.google.com/site/cfmatuk/" style="color:rgb(0,101,204)" target="_blank">http://sites.google.com/site/cfmatuk/</a></span><br>
</div>
</div></div>