Description Usage Arguments Author(s) See Also Examples

Returns the number of common elements, i.e., same states appearing at the same position in the two sequences.

1 |

`seq1` |
a sequence from a sequence object. |

`seq2` |
a sequence from a sequence object. |

`with.missing` |
if |

.

Alexis Gabadinho (with Gilbert Ritschard for help page)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
data(famform)
famform.seq <- seqdef(famform)
seqmpos(famform.seq[1,],famform.seq[2,])
seqmpos(famform.seq[2,],famform.seq[4,])
## Example with gaps in sequences
a <- c(NA,"A",NA,"B","C")
b <- c(NA,"C",NA,"B","C")
ex1.seq <- seqdef(rbind(a,b))
seqmpos(ex1.seq[1,], ex1.seq[2,])
seqmpos(ex1.seq[1,], ex1.seq[2,], with.missing=TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.