Skip to content
/ sawnuti Public

❗ This is a read-only mirror of the CRAN R package repository. sawnuti — Comparing Sequences with Non-Uniform Time Intervals

License

Notifications You must be signed in to change notification settings

cran/sawnuti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sawnuti

An algorithm for the comparison of two sequences in time. This package implements the methods introduced in Murph et al. 2021.

This repository is organized as a stand-alone R package. For questions, issues, or clarifications please reach out to Murph: [email protected]. Feel free to email any applications; we'd be happy to highlight them here.

Installation

You can install the latest version from CRAN using:

install.packages( "sawnuti" )
require( "sawnuti" )

Examples

matchFunction = function(a,b){ifelse(a==b, 1, -1)}

sawnuti(string1="a b c", string2="d b c", times1="1 2 3",times2="3 2 1", alpha = 1, 
        match_function = matchFunction, gap_penalty = 1)
# $ScoreingMatrix
#   [,1] [,2] [,3] [,4]
# [1,]    0   -3   -5   -6
# [2,]   -3   -1   -4   -5
# [3,]   -1   -1    0   -2
# [4,]   -4   -4   -3   -1
#
# $AlignmentScore
# [1] "-1"
#
# $Alignment
#   [,1] [,2] [,3]
# [1,] "d"  "b"  "c"
# [2,] "|"  "|"  "|"
# [3,] "a"  "b"  "c"

Packages Required

None.

Citation

A. Murph, A. Flynt, B. R. King (2021). Comparing finite sequences of discrete events with non-uniform time intervals, Sequential Analysis, 40(3), 291-313.

About

❗ This is a read-only mirror of the CRAN R package repository. sawnuti — Comparing Sequences with Non-Uniform Time Intervals

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages