I got it! Thank you so much Jim!
On 20 October 2011 15:06, jim holtman wrote:
> try this: You were redfining 'transition' within the loop
>
> x <-
>
> c('A','D','F','H','N','A','C','H','F','D','F','F','H','K','G','D','D','B','N','K','O','V','S','S','F','H','J','U','K','T','H','S','R','G','S','R
Here is another way of getting the lists
> newtrans <- lapply(split(mydata, mydata$agents), function(.agent){
+ .all <- paste(.agent$actions, collapse = '')
+ .indx <- embed(seq(nchar(.all)), 2)
+ substring(.all, .indx[, 2], .indx[, 1])
+ })
>
> newtrans
$`2857`
[1] "LB"
$`293`
[1] "A
try this: You were redfining 'transition' within the loop
x <-
c('A','D','F','H','N','A','C','H','F','D','F','F','H','K','G','D','D','B','N','K','O','V','S','S','F','H','J','U','K','T','H','S','R','G','S','R','R','G','D','B','G','F','G','N','H','H','K','L','B','X','C','V','S','F','X','G','T','H',
Hi all,
I'd like to thank those who helped me with my previous loop function
question with agents/events. I have solved the problem with the advice from
this community.
I have now moved on to the next step, which requires me to find all the
transition pair within an event. A sample data and the
4 matches
Mail list logo