Running examples in ‘TraMineR-Ex.R’ failed
The error most likely occurred in:

> ### Name: seqdef
> ### Title: Create a state sequence object
> ### Aliases: seqdef print.stslist
> ### Keywords: Data handling State sequences
> 
> ### ** Examples
> 
> ## Creating a sequence object with the columns 13 to 24
> ## in the 'actcal' example data set
> data(actcal)
> actcal.seq <- seqdef(actcal,13:24,
+ 	labels=c("> 37 hours", "19-36 hours", "1-18 hours", "no work"))
 [>] 4 distinct states appear in the data: 
     1 = A
     2 = B
     3 = C
     4 = D
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  A           A        > 37 hours
     2  B           B        19-36 hours
     3  C           C        1-18 hours
     4  D           D        no work
 [>] 2000 sequences in the data set
 [>] min/max sequence length: 12/12
> 
> ## Displaying the first 10 rows of the sequence object
> actcal.seq[1:10,]
     Sequence               
2848 B-B-B-B-B-B-B-B-B-B-B-B
1230 D-D-D-D-A-A-A-A-A-A-A-D
2468 B-B-B-B-B-B-B-B-B-B-B-B
654  C-C-C-C-C-C-C-C-C-B-B-B
6946 A-A-A-A-A-A-A-A-A-A-A-A
1872 D-B-B-B-B-B-B-B-B-B-B-B
2905 D-D-D-D-D-D-D-D-D-D-D-D
106  A-A-A-A-A-A-A-A-A-A-A-A
5113 A-A-A-A-A-A-A-A-A-A-A-A
4503 A-A-A-A-A-A-A-A-A-A-A-A
> 
> ## Displaying the first 10 rows of the sequence object
> ## in SPS format
> print(actcal.seq[1:10,], format="SPS")
     Sequence         
[1]  (B,12)           
[2]  (D,4)-(A,7)-(D,1)
[3]  (B,12)           
[4]  (C,9)-(B,3)      
[5]  (A,12)           
[6]  (D,1)-(B,11)     
[7]  (D,12)           
[8]  (A,12)           
[9]  (A,12)           
[10] (A,12)           
> 
> ## Plotting the first 10 sequences
> plot(actcal.seq)
> 
> ## Re-ordering the alphabet
> actcal.seq <- seqdef(actcal,13:24,alphabet=c("B","A","D","C"))
 [>] 4 distinct states appear in the data: 
     1 = A
     2 = B
     3 = C
     4 = D
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  B           B        B
     2  A           A        A
     3  D           D        D
     4  C           C        C
 [>] 2000 sequences in the data set
 [>] min/max sequence length: 12/12
> alphabet(actcal.seq)
[1] "B" "A" "D" "C"
> 
> ## Adding a state not appearing in the data to the
> ## alphabet
> actcal.seq <- seqdef(actcal,13:24,alphabet=c("A","B","C","D","E"))
 [>] 4 distinct states appear in the data: 
     1 = A
     2 = B
     3 = C
     4 = D
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  A           A        A
     2  B           B        B
     3  C           C        C
     4  D           D        D
     5  E           E        E
 [>] 2000 sequences in the data set
 [>] min/max sequence length: 12/12
> alphabet(actcal.seq)
[1] "A" "B" "C" "D" "E"
> 
> ## Adding a state not appearing in the data to the
> ## alphabet and changing the states labels
> actcal.seq <- seqdef(actcal,13:24,
+   alphabet=c("A","B","C","D","E"),
+   states=c("FT","PT","LT","NO","TR"))
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  A           FT       FT
     2  B           PT       PT
     3  C           LT       LT
     4  D           NO       NO
     5  E           TR       TR
 [>] 2000 sequences in the data set
 [>] min/max sequence length: 12/12
> alphabet(actcal.seq)
[1] "FT" "PT" "LT" "NO" "TR"
> actcal.seq[1:10,]
     Sequence                           
2848 PT-PT-PT-PT-PT-PT-PT-PT-PT-PT-PT-PT
1230 NO-NO-NO-NO-FT-FT-FT-FT-FT-FT-FT-NO
2468 PT-PT-PT-PT-PT-PT-PT-PT-PT-PT-PT-PT
654  LT-LT-LT-LT-LT-LT-LT-LT-LT-PT-PT-PT
6946 FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT
1872 NO-PT-PT-PT-PT-PT-PT-PT-PT-PT-PT-PT
2905 NO-NO-NO-NO-NO-NO-NO-NO-NO-NO-NO-NO
106  FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT
5113 FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT
4503 FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT-FT
> 
> ## ============================
> ## Example with missing values
> ## ============================
> data(ex1)
> 
> ## With right="DEL" default value
> seqdef(ex1,1:13)
 [>] found missing values ('NA') in sequence data
 [>] preparing 7 sequences
 [>] coding void elements with '%' and missing values with '*'
 [!] sequence with index: 7 contains only missing values.
     This may produce inconsistent results.
 [>] 4 distinct states appear in the data: 
     1 = A
     2 = B
     3 = C
     4 = D
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  A           A        A
     2  B           B        B
     3  C           C        C
     4  D           D        D
 [>] 7 sequences in the data set
 [>] min/max sequence length: 10/13
   Sequence                 
s1 *-*-*-A-A-A-A-A-A-A-A-A-A
s2 D-D-D-B-B-B-B-B-B-B      
s3 *-D-D-D-D-D-D-D-D-D-D    
s4 A-A-*-*-B-B-B-B-D-D      
s5 A-*-A-A-A-A-*-A-A-A      
s6 *-*-*-C-C-C-C-C-C-C      
s7 *-*-*-*-*-*-*-*-*-*-*-*-*
> 
> ## Eliminating 'left' missing values
> seqdef(ex1,1:13, left="DEL")
 [>] found missing values ('NA') in sequence data
 [>] preparing 7 sequences
 [>] coding void elements with '%' and missing values with '*'
 [!] sequence with index: 7 contains only missing values.
     This may produce inconsistent results.
 [>] 4 distinct states appear in the data: 
     1 = A
     2 = B
     3 = C
     4 = D
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  A           A        A
     2  B           B        B
     3  C           C        C
     4  D           D        D
 [>] 7 sequences in the data set
 [>] min/max sequence length: 7/13
   Sequence                 
s1 A-A-A-A-A-A-A-A-A-A      
s2 D-D-D-B-B-B-B-B-B-B      
s3 D-D-D-D-D-D-D-D-D-D      
s4 A-A-*-*-B-B-B-B-D-D      
s5 A-*-A-A-A-A-*-A-A-A      
s6 C-C-C-C-C-C-C            
s7 *-*-*-*-*-*-*-*-*-*-*-*-*
> 
> ## Eliminating 'left' missing values and gaps
> seqdef(ex1,1:13, left="DEL", gaps="DEL")
 [>] found missing values ('NA') in sequence data
 [>] preparing 7 sequences
 [>] coding void elements with '%' and missing values with '*'
 [!] sequence with index: 7 contains only missing values.
     This may produce inconsistent results.
 [>] 4 distinct states appear in the data: 
     1 = A
     2 = B
     3 = C
     4 = D
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  A           A        A
     2  B           B        B
     3  C           C        C
     4  D           D        D
 [>] 7 sequences in the data set
 [>] min/max sequence length: 7/13
   Sequence                 
s1 A-A-A-A-A-A-A-A-A-A      
s2 D-D-D-B-B-B-B-B-B-B      
s3 D-D-D-D-D-D-D-D-D-D      
s4 A-A-B-B-B-B-D-D          
s5 A-A-A-A-A-A-A-A          
s6 C-C-C-C-C-C-C            
s7 *-*-*-*-*-*-*-*-*-*-*-*-*
> 
> ## ====================
> ## Example with weights
> ## ====================
> ex1.seq <- seqdef(ex1, 1:13, weights=ex1$weights)
 [>] found missing values ('NA') in sequence data
 [>] preparing 7 sequences
 [>] coding void elements with '%' and missing values with '*'
 [!] sequence with index: 7 contains only missing values.
     This may produce inconsistent results.
 [>] 4 distinct states appear in the data: 
     1 = A
     2 = B
     3 = C
     4 = D
 [>] state coding:
       [alphabet]  [label]  [long label] 
     1  A           A        A
     2  B           B        B
     3  C           C        C
     4  D           D        D
 [>] sum of weights: 60 - min/max: 0/29.3
 [>] 7 sequences in the data set
 [>] min/max sequence length: 10/13
> 
> ## weighted sequence frequencies
> seqtab(ex1.seq)
Error in print.default(m, ..., quote = quote, right = right, max = max) : 
  invalid printing width
Calls: <Anonymous> ... print -> print.data.frame -> print -> print.default
Execution halted