#' @title Builds a vector with the IDs of the mobile devices.
#'
#' @description Builds a vector with the IDs of the mobile devices by taking
#' the unique values from the events data set.
#'
#' @param events A data.table object that contains the events generated by the
#' mobile network. It is returned by the \code{readEvents()} function. The device
#' IDs are on the second column of this data.table object.
#'
#'
#' @return A vector with the IDs of the mobile devices detected by the network.
#'
#' @import data.table
#' @export
getDeviceIDs <- function(events) {
devices <- unique(events[, 2])[[1]]
return(sort(as.numeric(devices)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.