sasDateRange: sasDateRange

View source: R/sasWhereConstructors.R

sasDateRangeR Documentation

sasDateRange

Description

Helper function for making sas "Where" statements for use in importSAS(). Creates date range (inclusive) in SAS formate

Usage

sasDateRange(var.date, date.start, date.end, inclusive = TRUE)

Arguments

var.date

Name of the date variable in the SAS dataset

date.start

The start date of the desired date range in r date format

date.end

The end date of the desired date range in r date format

inclusive

Logical. If TRUE do greater or equal instead of greater.

Value

Function returns a string that can be passed to the "where" statement of importSAS. Alternatinvely it can be passed to makeSasWhereStatment function to be combined with further SAS where statements

Author(s)

Matthew Phelps <mphelps@hjerteforeningen.dk>

Examples

sasDateRange("inddto", as.Date("2015-01-01"), as.Date("2016-01-01"))

tagteam/heaven documentation built on Oct. 24, 2024, 7:40 p.m.