Skip to content
Prev 274948 / 398506 Next

Constructing the transition pair using loop function and paste()

Here is another way of getting the lists
+     .all <- paste(.agent$actions, collapse = '')
+     .indx <- embed(seq(nchar(.all)), 2)
+     substring(.all, .indx[, 2], .indx[, 1])
+ })
$`2857`
[1] "LB"

$`293`
[1] "AD" "DF" "FH" "HN" "NA" "AC" "CH"

$`4596`
[1] "FG" "GN" "NH" "HH" "HK"

$`498`
[1] "FD" "DF" "FF" "FH" "HK"

$`5629`
[1] "HH" "HH" "HR"

$`6018`
[1] "SF" "FX" "XG" "GT"

$`6178`
[1] "XC" "CV"

$`6209`
[1] "FH" "HJ" "JU"

$`6847`
[1] "GD" "DD" "DB" "BN" "NK" "KO" "OV" "VS" "SS"

$`7535`
[1] "AE" "ED" "DC"

$`8562`
 [1] "KT" "TH" "HS" "SR" "RG" "GS" "SR" "RR" "RG" "GD" "DB" "BG"

        
On Thu, Oct 20, 2011 at 10:08 AM, Sally Zhen <saliluna at gmail.com> wrote: