ucred_ff | R Documentation |
Sliding-window similarity search using euclidean distance. This implementation is very close to the UCR Suite command line utility, in that it takes files as inputs for both query and data
ucred_ff(data, query, qlength)
data |
character; path to data file |
query |
character; path to query file |
qlength |
integer; length of query (n data points). Usually the length of the data contained in |
a ucred object. A list with the following elements
location: The starting location of the nearest neighbor of the given query, of size qlength
, in the data. Note that location starts from 1.
distance: The euclidean distance between the nearest neighbor and the query.
#locate example data file
dataf <- system.file("extdata/col_sc.txt", package="rucrdtw")
#locate example query file
queryf <- system.file("extdata/mid_sc.txt", package="rucrdtw")
#determine length of query file
qlength <- length(scan(queryf))
#run query
ucred_ff(dataf, queryf, qlength)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.