Description Usage Arguments Value Author(s) Examples
Take request and group specification, it returns corresponding data from the source DB. In case of invalid request, it returns an NULL and prints out a warning message.
1 2 3 4 5 6 7 8 9 |
request |
Station codes for the request.
It should be a |
group |
Group specification.
Should be one of |
FUN |
Function to be applied when groupping.
Note that if |
... |
Extra arguments for |
from |
Character string specifying the start day(inclusive).
It should be a |
to |
Character string specifiying the end day(inclusive).
It should be a |
split |
If |
A data frame holding the requested info if split
is FALSE.
A list properly splitted by the station code if split
is TRUE.
Sanghyun Park, Daun Jeong, and Sehun Kim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Get daily subway data of SNU and Shinchon station
# 228 and 240 are the station codes for SNU and Shinchon, respectively
data <- get.subway(c(228, 240), group = "day")
head(data)
# Get montly subway data of SNU and Shinchon station
# We want splitted data and want to mean over every month
data <- get.subway(c(228, 240), group = "month", FUN = mean, split = TRUE)
head(data$"228")
head(data$"240")
# Get weekly data of SNU station to 12/31/2019
data <- get.subway(228, group = "week", to = "2019-12-31")
tail(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.