Download or resume a download of the activity
table in an existing Motus
database. Batch activity refers to the number of hits detected during a given
batch. Batches with large numbers of hits may indicate interference and thus
unreliable hits.
Arguments
- src
SQLite connection (result of
tagme(XXX)
orDBI::dbConnect(RSQLite::SQLite(), "XXX.motus")
)- resume
Logical. Resume a download? Otherwise the table is removed and the download is started from the beginning.
Détails
This function is automatically run by the tagme()
function with
resume = TRUE
.
If an activity
table doesn't exist, it will be created prior to
downloading. If there is an existing activity
table, this will update the
records.
Exemples
# download and access data from project 176 in sql format
# usename 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"))
# Access 'activity' table
library(dplyr)
#>
#> Attachement du package : ‘dplyr’
#> Les objets suivants sont masqués depuis ‘package:stats’:
#>
#> filter, lag
#> Les objets suivants sont masqués depuis ‘package:base’:
#>
#> intersect, setdiff, setequal, union
a <- tbl(sql.motus, "activity")
# If interrupted and you want to resume
if (FALSE) my_tags <- activity(sql.motus, resume = TRUE)