activity table is used to identify batches with too much noise.
Depending on the value of
return these are filtered out, returned, or
identified in the
alltags view with the column
probability. No changes
to the database are made.
filterByActivity( src, return = "good", view = "alltags", minLen = 3, maxLen = 5, maxRuns = 100, ratio = 0.85 )
SQLite connection (result of
Character. One of "good" (return only 'good' runs), "bad" (return only 'bad' runs), "all" (return all runs, but with a new
probabilitycolumn which identifies 'bad' (0) and 'good' (1) runs.
Character. Which view to use, one of "alltags" (faster) or "alltagsGPS" (with GPS data).
Numeric. The minimum run length to allow (equal to or below this, all runs are 'bad')
Numeric. The maximum run length to allow (equal to or above this, all runs are 'good')
Numeric. The cutoff of number of runs in a batch (see Details)
Numeric. The ratio cutoff of runs length 2 to number of runs in a batch (see Details)
Runs are identified by the following:
All runs with a length >=
All runs with a length <=
Runs with a length between
maxLenare BAD IF both of the following is true:
belong to a batch where the number of runs is >=
the ratio of runs with a length of 2 to the number of runs total is >=
# download and access data from project 176 in sql format # username and password are both "motus.sample" if (FALSE) sql.motus <- tagme(176, new = TRUE, update = TRUE) # OR use example sql file included in `motus` sql.motus <- tagme(176, update = FALSE, dir = system.file("extdata", package = "motus")) tbl_good <- filterByActivity(sql.motus) tbl_bad <- filterByActivity(sql.motus, return = "bad") tbl_all <- filterByActivity(sql.motus, return = "all")