getInterval: Get Interval

Description Usage Arguments Value Examples

Description

Calculates an intervall from now-decrease until now. Twitter uses GMT therefore the supplied time can be modifed by adjust, default is for German daylight saving time. Alternatively an interval may be provided and the corresponding unix timestamps will be returned. Set Sys.setlocale("LC_TIME", "English") in order to be able to correctly process the twitter timestamp. Avoid timestamps with the times 00:00:00 and 12:00:00 since they are a digit short.

Usage

1
getInterval(decrease = 60, adjust = 0, inputinterval)

Arguments

decrease

size of interval (in minutes)

adjust

time to subtract from system time to get GMT (in minutes)

inputinterval

alternatively input a time interval

Value

interval

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Get an interval covering the last 24 hours
getInterval(60*24)

#Get an interval covering the last hour
getInterval()

#Specify interval and get corresponding unix timestamps
#isodate <- c("2016-01-04 18:37:43","2016-01-05 18:37:43")
#getInterval(inputinterval = isodate)

#twitter <- c("Tue Jan 05 12:51:00 +0000 2016","Tue Jan 05 16:51:00 +0000 2016")
#twitter <- getInterval(inputinterval = twitter)

ProjectTw/TwitteR2Mongo documentation built on May 8, 2019, 3:44 a.m.