R/getDeviceIDs.R

Defines functions getDeviceIDs

Documented in getDeviceIDs

#' @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)))
  
}
bogdanoancea/deduplication documentation built on Dec. 2, 2020, 11:22 p.m.