Skip to contents

Filter by selected criteria. Not all criteria need to be filled in. Unfilled criteria are set by default so that no filtering is performed.

Usage

filtering(
  data = NULL,
  sensor = NULL,
  direction = " ",
  mobility = c("car", "heavy", "pedestrian", "bike"),
  date_range = NULL,
  vac = NULL,
  p_h = NULL,
  wkd = NULL,
  vacations = NULL,
  public_holidays = NULL
)

Arguments

data

dat.frame. See the "importation" function in the '2-import.R' file

sensor

character. Id of desired sensor between quotations

direction

character. Direction of the street: " " or "_lft" or "_rgt"

mobility

character. Type of mobility: c("car","heavy","pedestrian","bike")

date_range

Date vector, c("aaaa-mm-jj","aaaa-mm-jj")

vac

character. With, without, or only with vacation: "YES" or "NO" or "ONLY"

p_h

character. With, without, or only with public holiday: "YES" or "NO" or "ONLY"

wkd

character vector. Selected days of the week: c("1","2","3","4","5","6","7") starting with one for Monday. Make sure to use options(lubridate.week.start = 1) for this function to perform correctly.

vacations

data.frame, containing 3 columns : desctiption, start_date and end_date

  • the description column contains character vectors with the name of every vacations you are studying

  • starting_date and ending_date are Date-Time vectors(POSIXct) in the format "year-month-day hour:minute:second", obtainable for example using ymd_hms from the lubridate package

public_holidays

date vector, containing the public holidays dates in a "Year-month-day" format.

Value

the filtered data