<div dir="ltr"><div><div><div>Hi there,<br></div>Anton, I just used the  HSPELL_to_STS function and it worked well.<br>I suggest you to try something like this:<br><br>seq_sts <- HSPELL_to_STS(data,<br>    begin=c("BEGIN1","BEGIN2",...),<br>    end=c("END1","END2",...),<br>    status=c("STATE1","STATE2",...))<br><br></div>Best,<br></div>Simon<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-11 8:53 GMT+02:00 thomas collas <span dir="ltr"><<a href="mailto:thomas.collas@gmail.com" target="_blank">thomas.collas@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>That's the same proposition actually.</div><div>tc</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-11 8:45 GMT+02:00 Hadrien Commenges <span dir="ltr"><<a href="mailto:hc@parisgeo.cnrs.fr" target="_blank">hc@parisgeo.cnrs.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Arial,Helvetica,sans-serif;font-size:12pt;color:#000000"><div>You could also split your table by set of columns (columns 1:4, then col c(1, 5:7), etc.) and then rbind() all the tables.<br></div><div><br></div><div>Another option would be the melt() function in the reshape2 package.<br></div><div><br></div><hr><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>De: </b>"thomas collas" <<a href="mailto:thomas.collas@gmail.com" target="_blank">thomas.collas@gmail.com</a>><br><b>À: </b>"Users questions" <<a href="mailto:traminer-users@lists.r-forge.r-project.org" target="_blank">traminer-users@lists.r-forge.r-project.org</a>><br><b>Envoyé: </b>Mercredi 10 Juin 2015 21:03:05<br><b>Objet: </b>Re: [Traminer-users] Format of sequences<div><div><br><div><br></div><div dir="ltr">Addendum : Do not forget to keep the ID column with the three other columns at each iteration.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-10 21:01 GMT+02:00 thomas collas <span dir="ltr"><<a href="mailto:thomas.collas@gmail.com" target="_blank">thomas.collas@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Anton,<div>An easy solution is to build a very short loop (I know R is not made for loops but it's only 18 iterations) separating each group of  three columns, turning the headings into common ones (begin/end/state) and pasting each one below the other.</div><div>I hope that helps,</div><div>thomas collas</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-10 18:51 GMT+02:00 Anton Perdoncin <span dir="ltr"><<a href="mailto:anton.perdoncin@gmail.com" target="_blank">anton.perdoncin@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br> <br> I have sequences in the following format :<br> <br> ID    BEGIN1        END1            STATE1        BEGIN2        END2<br>    STATE2  etc... until 18<br> 1   01/01/1950  01/01/1960          X         02/01/1960   30/01/1960<br>    Y    ...<br> 2   01/01/1950  01/01/1960          X         02/01/1960   30/01/1960<br>    Y    ...<br> <br> One line = one individual. Successive episodes = successive columns.<br> <br> I know that I need to convert dates into numbers: no problem with that.<br> <br> However, does anyone have any idea on how I could convert such a df into<br> an STS or SPELL format ?<br> <br> Thanks!<br> <br> Best regards,<br> <br> Anton Perdoncin<br> _______________________________________________<br> Traminer-users mailing list<br> <a href="mailto:Traminer-users@lists.r-forge.r-project.org" target="_blank">Traminer-users@lists.r-forge.r-project.org</a><br> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br></blockquote></div><br></div></div></div></blockquote></div><br></div><br>_______________________________________________<br>Traminer-users mailing list<br><a href="mailto:Traminer-users@lists.r-forge.r-project.org" target="_blank">Traminer-users@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a></div></div></div><div><br></div></div></div><br>_______________________________________________<br>
Traminer-users mailing list<br>
<a href="mailto:Traminer-users@lists.r-forge.r-project.org" target="_blank">Traminer-users@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
Traminer-users mailing list<br>
<a href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br></blockquote></div><br></div>

<br>
<font size="1" style="font-family:Arial,Helvetica,sans-serif"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">------------------------------</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><WBR>------------------------------</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><WBR>--------------</span></font><div style="font-family:Arial,Helvetica,sans-serif"><font size="1"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">Tous les courriers électroniques émis depuis la messagerie </span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">de Sciences Po doivent respecter les conditions d'usage.</span></font></div><div style="font-family:Arial,Helvetica,sans-serif"><font size="1"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">Pour les consulter rendez-vous sur :</span></font></div><div><font size="1"><a href="http://www.sciencespo.fr/ressources-numeriques/fr/content/regles-de-confidentialite" style="font-family:arial,sans-serif;color:rgb(17,85,204);background-color:rgb(255,255,255)" target="_blank">http://www.sciencespo.fr/<WBR>ressources-numeriques/fr/<WBR>content/regles-de-<WBR>confidentialite</a></font></div>