-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathdownload_RStudio_CRAN_data.Rd
More file actions
68 lines (60 loc) · 2.31 KB
/
Copy pathdownload_RStudio_CRAN_data.Rd
File metadata and controls
68 lines (60 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{download_RStudio_CRAN_data}
\alias{download_RStudio_CRAN_data}
\title{Download RStudio CRAN mirror data files into a folder}
\usage{
download_RStudio_CRAN_data(START = as.Date(Sys.time()) - 5,
END = as.Date(Sys.time()), log_folder = tempdir(),
trunc_END_date_to_today = TRUE, override = FALSE, message = TRUE, ...)
}
\arguments{
\item{START}{the defaults is 5 days before today. A
character string of the START date for files to be
downloaded. The date format is "YYYY-MM-DD".}
\item{END}{the defaults is today. A character string of
the END date for files to be downloaded. The date format
is "YYYY-MM-DD".}
\item{log_folder}{the folder into which we would like the
files to be downloaded to. Default is the temporary
folder picked by \link{tempdir}.}
\item{trunc_END_date_to_today}{default is TRUE. Makes
sure that if END date is later then today, the END date
will be change to today (since otherwise, we will only
get many 404 errors)}
\item{override}{boolean (default is FALSE) - should the
function download files that are already available in the
temp folder}
\item{...}{not in use.}
\item{massage}{boolean (default is TRUE) - should a
massage be printed in interesting cases.}
}
\value{
Returns the value of log_folder.
}
\description{
This function downlaod these files based on the code from
the downlaod page (\url{http://cran-logs.rstudio.com/})
into a temporary folder.
}
\details{
RStudio maintains its own CRAN mirror,
\url{http://cran.rstudio.com} and offers its log files.
}
\examples{
\dontrun{
# The first two functions might take a good deal of time to run (depending on the date range)
RStudio_CRAN_data_folder <-
download_RStudio_CRAN_data(START = '2013-04-02',
END = '2013-04-05')
# around the time R 3.0.0 was released
# RStudio_CRAN_data_folder <- download_RStudio_CRAN_data()
my_RStudio_CRAN_data <- read_RStudio_CRAN_data(RStudio_CRAN_data_folder)
# barplots: (more functions can easily be added in the future)
barplot_package_users_per_day("installr", my_RStudio_CRAN_data)
barplot_package_users_per_day("plyr", my_RStudio_CRAN_data)
}
}
\seealso{
\link{download_RStudio_CRAN_data},
\link{read_RStudio_CRAN_data},\link{barplot_package_users_per_day}
}