From 744e70926b21a1c0c6df8f7eb05c665bef623d5b Mon Sep 17 00:00:00 2001 From: Tal Galili Date: Tue, 2 Jul 2013 23:37:35 +0300 Subject: [PATCH] Fixes for CRAN upload --- DESCRIPTION | 2 ++ NAMESPACE | 34 +++++++++++++++++----------------- NEWS | 2 +- R/RStudio_CRAN_data.r | 12 +++++++++--- R/updateR.r | 8 +++++--- R/zzz.r | 2 +- man/install.Cygwin.Rd | 2 +- man/install.FFmpeg.Rd | 2 +- man/install.GitHub.Rd | 2 +- man/install.GraphicsMagick.Rd | 2 +- man/install.ImageMagick.Rd | 2 +- man/install.LaTeX2RTF.Rd | 2 +- man/install.LyX.Rd | 2 +- man/install.MikTeX.Rd | 2 +- man/install.R.Rd | 3 +++ man/install.RStudio.Rd | 2 +- man/install.Rtools.Rd | 2 +- man/install.SWFTools.Rd | 2 +- man/uninstall.R.Rd | 4 ++-- man/updateR.Rd | 1 + 20 files changed, 52 insertions(+), 38 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 85002d7..30be0a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -23,6 +23,8 @@ URL: https://github.com/talgalili/installr/, BugReports: https://github.com/talgalili/installr/issues Depends: R (>= 2.11.0) +Imports: + utils Suggests: XML, devtools, diff --git a/NAMESPACE b/NAMESPACE index 98edbc7..6c5bfc6 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,3 +1,4 @@ +export(R_version_in_a_folder) export(ask.user.yn.question) export(barplot_package_users_per_day) export(browse.latest.R.NEWS) @@ -12,39 +13,39 @@ export(format_RStudio_CRAN_data) export(freegeoip) export(get.installed.R.folders) export(install.7zip) -export(install.cygwin) export(install.Cygwin) -export(install.ffmpeg) export(install.FFmpeg) +export(install.GitHub) +export(install.GraphicsMagick) +export(install.ImageMagick) +export(install.LaTeX2RTF) +export(install.LyX) +export(install.MikTeX) +export(install.R) +export(install.RStudio) +export(install.Rtools) +export(install.SWFTools) +export(install.URL) +export(install.cygwin) +export(install.ffmpeg) export(install.git) export(install.github) -export(install.GitHub) export(install.graphicsmagick) -export(install.GraphicsMagick) export(install.imagemagick) -export(install.ImageMagick) export(install.latex2rtf) -export(install.LaTeX2RTF) export(install.lyx) -export(install.LyX) export(install.miktex) -export(install.MikTeX) export(install.notepadpp) export(install.npptor) export(install.packages.zip) export(install.pandoc) -export(install.R) export(install.rstudio) -export(install.RStudio) export(install.rtools) -export(install.Rtools) export(install.swftools) -export(install.SWFTools) -export(install.URL) export(installr) -export(is.empty) -export(is.Rgui) export(is.RStudio) +export(is.Rgui) +export(is.empty) export(is.windows) export(lineplot_package_downloads) export(most_downloaded_packages) @@ -55,12 +56,11 @@ export(os.manage) export(os.restart) export(os.shutdown) export(os.sleep) -export(R_version_in_a_folder) export(read_RStudio_CRAN_data) export(require2) export(restart_RGui) export(source.https) export(system.PATH) -export(uninstall.r) export(uninstall.R) +export(uninstall.r) export(updateR) diff --git a/NEWS b/NEWS index 53a23cd..cba9b08 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -installr 0.10.0 (2013-07-03) +installr 0.10.0 (2013-07-02) --------------------------- NEW FUNCTIONS ADDED: diff --git a/R/RStudio_CRAN_data.r b/R/RStudio_CRAN_data.r index 06741cc..566fce4 100644 --- a/R/RStudio_CRAN_data.r +++ b/R/RStudio_CRAN_data.r @@ -263,15 +263,21 @@ barplot_package_users_per_day <- function(pkg_name, dataset, remove_dups = TRUE, #' barplot_package_users_per_day("plyr", my_RStudio_CRAN_data) #' } lineplot_package_downloads <- function(pkg_names, dataset, by_time = c("date", "week"), ...) { - require2(ggplot2) - require2(plyr) + require2("ggplot2") + require2("plyr") by_time <- by_time[1] # plot 1: Compare downloads of selected packages on a weekly basis # agg1 <- dataset[J(pkg_names), length(unique(dataset$ip_id)), by=c(by_time, "package")] - agg1 <- ddply(dataset[dataset$package %in% pkg_names,], .(time= get(by_time), package), function(xx) {c(V1 = length(unique(xx$ip_id)))}) + #----- + # only added in order to avoid the "note" in the check before uploading to CRAN... + V1 <- NA + package <- NA + #----- + + agg1 <- ddply(dataset[dataset$"package" %in% pkg_names,], .(time= get(by_time), package), function(xx) {c(V1 = length(unique(xx$ip_id)))}) # suppressWarnings(colnames(agg1)[1] <- "time") o <- ggplot(agg1, aes(x=time, y=V1, color=package, group=package)) + geom_line() + ylab("Downloads") + theme_bw() + theme(axis.text.x = element_text(angle=90, size=8, vjust=0.5)) diff --git a/R/updateR.r b/R/updateR.r index 11b1067..3967e93 100644 --- a/R/updateR.r +++ b/R/updateR.r @@ -203,6 +203,7 @@ browse.latest.R.NEWS <- function( #' @title Downloads and installs the latest R version +#' @export #' @description Fetches the latest (not development!) R version #' @details #' If you are not sure if you need to update R or not, you are @@ -212,7 +213,7 @@ browse.latest.R.NEWS <- function( #' @param to_checkMD5sums Should we check that the new R installation has the files we expect it to (by checking the MD5 sums)? default is TRUE. It assumes that the R which was isntalled is the latest R version. #' @param ... extra parameters to pass to \link{install.URL} #' @return TRUE/FALSE - was the installation of R successful or not. -#' @export +#' @seealso \link{uninstall.R}, \link{updateR}, \link{shell} #' @examples #' \dontrun{ #' install.R() @@ -551,7 +552,8 @@ copy.packages.between.libraries <- function(from, to, ask =FALSE,keep_old = TRUE #' @param to_checkMD5sums Should we check that the new R installation has the files we expect it to (by checking the MD5 sums)? default is TRUE. It assumes that the R which was isntalled is the latest R version. parameter is passed to install.R() #' @param ... Other arguments (this is currently not used in any way) #' @return a TRUE/FALSE value on whether or not R was updated. -#' @seealso \link{check.for.updates.R}, \link{install.R}, \link{copy.packages.between.libraries}, +#' @seealso \link{check.for.updates.R}, \link{install.R}, +#' \link{copy.packages.between.libraries}, \link{uninstall.R} #' @examples #' \dontrun{ #' updateR(T, T, T, T, T, T, T) @@ -646,7 +648,7 @@ updateR <- function(browse_news, install_R, copy_packages, keep_old_packages, u #' default is empty - resulting in a prompt massage asking the user what to do. #' @param use_GUI If asking the user which R version to uninstall, should the GUI be used? (default is TRUE) #' @return the output of \link{shell} running the uninstaller -#' @seealso \link{install.R}, \link{update.R}, \link{shell} +#' @seealso \link{install.R}, \link{updateR}, \link{shell} #' @examples #' \dontrun{ #' uninstall.R() # choose an R version to uninstall diff --git a/R/zzz.r b/R/zzz.r index 5e01410..4318d86 100644 --- a/R/zzz.r +++ b/R/zzz.r @@ -86,7 +86,7 @@ remove.installr.GUI <- function() { installrWelcomeMessage <- function(){ paste("\n", - "Welcome to installr version ", packageDescription("installr")$Version, "\n", + "Welcome to installr version ", utils:::packageDescription("installr")$Version, "\n", "\n", # "Type ?installr to access the overall documentation and\n", # "vignette('installr') for the package vignette.\n", diff --git a/man/install.Cygwin.Rd b/man/install.Cygwin.Rd index 4e12d35..03a34b1 100644 --- a/man/install.Cygwin.Rd +++ b/man/install.Cygwin.Rd @@ -1,6 +1,6 @@ \name{install.Cygwin} -\alias{install.cygwin} \alias{install.Cygwin} +\alias{install.cygwin} \title{Downloads and installs Cygwin for windows} \usage{ install.Cygwin(URL = "http://cygwin.com/setup.exe", ...) diff --git a/man/install.FFmpeg.Rd b/man/install.FFmpeg.Rd index 0470b1c..3defaab 100644 --- a/man/install.FFmpeg.Rd +++ b/man/install.FFmpeg.Rd @@ -1,6 +1,6 @@ \name{install.FFmpeg} -\alias{install.ffmpeg} \alias{install.FFmpeg} +\alias{install.ffmpeg} \title{Downloads and installs FFmpeg for windows} \usage{ install.FFmpeg(page_with_download_url = "http://ffmpeg.zeranoe.com/builds/", diff --git a/man/install.GitHub.Rd b/man/install.GitHub.Rd index 5cffc09..dec1683 100644 --- a/man/install.GitHub.Rd +++ b/man/install.GitHub.Rd @@ -1,6 +1,6 @@ \name{install.GitHub} -\alias{install.github} \alias{install.GitHub} +\alias{install.github} \title{Downloads and installs GitHub for windows} \usage{ install.GitHub(URL = "http://github-windows.s3.amazonaws.com/GitHubSetup.exe", diff --git a/man/install.GraphicsMagick.Rd b/man/install.GraphicsMagick.Rd index ae64c54..bb41e4a 100644 --- a/man/install.GraphicsMagick.Rd +++ b/man/install.GraphicsMagick.Rd @@ -1,6 +1,6 @@ \name{install.GraphicsMagick} -\alias{install.graphicsmagick} \alias{install.GraphicsMagick} +\alias{install.graphicsmagick} \title{Downloads and installs GraphicsMagick for windows} \usage{ install.GraphicsMagick(URL = "http://sourceforge.net/projects/graphicsmagick/", diff --git a/man/install.ImageMagick.Rd b/man/install.ImageMagick.Rd index ff8eaa3..6d0da2f 100644 --- a/man/install.ImageMagick.Rd +++ b/man/install.ImageMagick.Rd @@ -1,6 +1,6 @@ \name{install.ImageMagick} -\alias{install.imagemagick} \alias{install.ImageMagick} +\alias{install.imagemagick} \title{Downloads and installs ImageMagick for windows} \usage{ install.ImageMagick(URL = "http://www.imagemagick.org/script/binary-releases.php", diff --git a/man/install.LaTeX2RTF.Rd b/man/install.LaTeX2RTF.Rd index 4050f01..2503915 100644 --- a/man/install.LaTeX2RTF.Rd +++ b/man/install.LaTeX2RTF.Rd @@ -1,6 +1,6 @@ \name{install.LaTeX2RTF} -\alias{install.latex2rtf} \alias{install.LaTeX2RTF} +\alias{install.latex2rtf} \title{Downloads and installs LaTeX2RTF for windows} \usage{ install.LaTeX2RTF(page_with_download_url = "http://sourceforge.net/projects/latex2rtf/", diff --git a/man/install.LyX.Rd b/man/install.LyX.Rd index 3e50fd7..7feb1ba 100644 --- a/man/install.LyX.Rd +++ b/man/install.LyX.Rd @@ -1,6 +1,6 @@ \name{install.LyX} -\alias{install.lyx} \alias{install.LyX} +\alias{install.lyx} \title{Downloads and installs LyX for windows} \usage{ install.LyX(page_with_download_url = "http://www.lyx.org/Download", diff --git a/man/install.MikTeX.Rd b/man/install.MikTeX.Rd index 94d7067..64616b5 100644 --- a/man/install.MikTeX.Rd +++ b/man/install.MikTeX.Rd @@ -1,6 +1,6 @@ \name{install.MikTeX} -\alias{install.miktex} \alias{install.MikTeX} +\alias{install.miktex} \title{Downloads and installs MikTeX for windows} \usage{ install.MikTeX(version, diff --git a/man/install.R.Rd b/man/install.R.Rd index 7198af3..03d79f1 100644 --- a/man/install.R.Rd +++ b/man/install.R.Rd @@ -35,4 +35,7 @@ install.R() } } +\seealso{ + \link{uninstall.R}, \link{updateR}, \link{shell} +} diff --git a/man/install.RStudio.Rd b/man/install.RStudio.Rd index 61e0efe..d47b5f9 100644 --- a/man/install.RStudio.Rd +++ b/man/install.RStudio.Rd @@ -1,6 +1,6 @@ \name{install.RStudio} -\alias{install.rstudio} \alias{install.RStudio} +\alias{install.rstudio} \title{Downloads and installs RStudio for windows} \usage{ install.RStudio(page_with_download_url = "http://www.rstudio.com/ide/download/desktop", diff --git a/man/install.Rtools.Rd b/man/install.Rtools.Rd index c38a584..78e6ab4 100644 --- a/man/install.Rtools.Rd +++ b/man/install.Rtools.Rd @@ -1,6 +1,6 @@ \name{install.Rtools} -\alias{install.rtools} \alias{install.Rtools} +\alias{install.rtools} \title{Downloads and installs Rtools} \source{ Some parts of the code are taken from the devtools, see diff --git a/man/install.SWFTools.Rd b/man/install.SWFTools.Rd index e5a81c7..d639459 100644 --- a/man/install.SWFTools.Rd +++ b/man/install.SWFTools.Rd @@ -1,6 +1,6 @@ \name{install.SWFTools} -\alias{install.swftools} \alias{install.SWFTools} +\alias{install.swftools} \title{Downloads and installs SWFTools for windows} \usage{ install.SWFTools(page_with_download_url = "http://swftools.org/download.html", diff --git a/man/uninstall.R.Rd b/man/uninstall.R.Rd index e44b7c2..1fd040c 100644 --- a/man/uninstall.R.Rd +++ b/man/uninstall.R.Rd @@ -1,6 +1,6 @@ \name{uninstall.R} -\alias{uninstall.r} \alias{uninstall.R} +\alias{uninstall.r} \title{Uninstall an R version} \usage{ uninstall.R(r_version, use_GUI = TRUE) @@ -33,6 +33,6 @@ uninstall.R("10.10.0") # would pop up the menu options (until R 10.10.0 will be } } \seealso{ - \link{install.R}, \link{update.R}, \link{shell} + \link{install.R}, \link{updateR}, \link{shell} } diff --git a/man/updateR.Rd b/man/updateR.Rd index e36d2c0..41403d4 100644 --- a/man/updateR.Rd +++ b/man/updateR.Rd @@ -110,5 +110,6 @@ updateR() # will ask you what you want at every decision. \seealso{ \link{check.for.updates.R}, \link{install.R}, \link{copy.packages.between.libraries}, + \link{uninstall.R} }