From f23c3b606b0d88dccbe5d78f3dc6389e0561d964 Mon Sep 17 00:00:00 2001 From: Tal Galili Date: Fri, 29 Mar 2013 22:23:32 +0300 Subject: [PATCH] Fixes to the .Rd files in order to pass the checks for CRAN submission. --- .Rbuildignore | 4 +- DESCRIPTION | 24 ++-- NAMESPACE | 28 ++-- NEWS | 6 +- R/install.r | 31 ++-- R/os.manage.r | 2 +- README.html | 263 ---------------------------------- man/install.Cygwin.Rd | 2 +- man/install.FFmpeg.Rd | 23 +-- man/install.GitHub.Rd | 2 +- man/install.GraphicsMagick.Rd | 2 +- man/install.ImageMagick.Rd | 20 +-- man/install.LaTeX2RTF.Rd | 2 +- man/install.LyX.Rd | 2 +- man/install.MikTeX.Rd | 2 +- man/install.RStudio.Rd | 2 +- man/install.Rtools.Rd | 2 +- man/install.SWFTools.Rd | 2 +- man/is.exe.installed.Rd | 10 +- man/os.hibernate.Rd | 4 +- man/system.PATH.Rd | 5 +- 21 files changed, 86 insertions(+), 352 deletions(-) delete mode 100644 README.html diff --git a/.Rbuildignore b/.Rbuildignore index efa3d31..7c4b3ab 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,4 +1,6 @@ ^.*\.Rproj$ ^\.Rproj\.user$ \.gitignore$ -installR.Rproj \ No newline at end of file +installR.Rproj +\.RData$ +\.Rhistory$ \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 2675640..72e3094 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,21 +7,25 @@ Date: 2013-03-29 Author: Tal Galili Maintainer: Tal Galili Description: The 'installr' package aims at making the process of updating R on - Windows as easy as possible. Also, the package contains a (growing) set of functions for allowing - users to install new software (on Windows OS) using R. By simply running the installr() function, - the user can easily select (via a GUI interface) a software to install. There are also dedicated functions - for installing each software, such as: updateR(), install.RTools(), install.pandoc(), and many more. - While for Linux users, the installation process of new software may be just running a short - line of code, for the regular Windows user it often includes browsing - online, finding the latest version, downloading it, running the installer, - and deleting the installation file. All of these steps are automatically - done using functions in this package. + Windows as easy as possible. Also, the package contains a (growing) set of + functions for allowing users to install new software (on Windows OS) using + R. By simply running the installr() function, the user can easily select + (via a GUI interface) a software to install. There are also dedicated + functions for installing each software, such as: updateR(), + install.RTools(), install.pandoc(), and many more. While for Linux users, + the installation process of new software may be just running a short line + of code, for the regular Windows user it often includes browsing online, + finding the latest version, downloading it, running the installer, and + deleting the installation file. All of these steps are automatically done + using functions in this package. URL: https://github.com/talgalili/installr BugReports: https://github.com/talgalili/installr/issues Depends: R (>= 2.11.0) Suggests: - XML, devtools + XML, + devtools, + tools License: GPL-2 Collate: 'create.global.library.r' diff --git a/NAMESPACE b/NAMESPACE index ba18eb1..cf84532 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -5,38 +5,38 @@ export(create.global.library) export(file.name.from.url) 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.Rgui) export(is.RStudio) +export(is.Rgui) export(is.windows) export(os.hibernate) export(os.lock) diff --git a/NEWS b/NEWS index 7537f75..56bb226 100644 --- a/NEWS +++ b/NEWS @@ -5,7 +5,8 @@ UPDATED FUNCTIONS: * Made sure to include a lower-case version of all install.X functions. OTHER NOTES: - * More documentation. Updated README.md (fixed \link vs \url) + * More documentation. Updated README.md + * installR 0.9 is to be shiped to CRAN. @@ -84,6 +85,7 @@ FIXES FOR CRAN SUBMISSION: * Fixed some spelling mistakes in DESCRIPTION, * Made sure to run the checks in the latest R version (R 2.15.3, oh the irony) * Changed update.R to be called updateR (in order to avoid confusing it as an S3 variation to 'update') + * installR 0.8 is to be shiped to CRAN. My thanks goes to Prof Brian Ripley for his help. @@ -102,8 +104,6 @@ UPDATED FUNCTIONS: OTHER NOTES: * More documentation. Updated README.md (fixed \link vs \url) - * More documentation. Updated README.md - installR 0.6 ------------ diff --git a/R/install.r b/R/install.r index 62cba93..d0ceebf 100644 --- a/R/install.r +++ b/R/install.r @@ -630,7 +630,7 @@ install.rstudio <- function(...) install.RStudio(...) #' @aliases install.imagemagick #' @description Allows the user to downloads and install the latest version of ImageMagick for Windows. #' @details -#' ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. +#' ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bezier curves. #' This function downloads Win32 dynamic at 16 bits-per-pixel. #' @param page_with_download_url the URL of the ImageMagick download page. #' @param ... extra parameters to pass to \link{install.URL} @@ -860,16 +860,16 @@ install.7zip <- function(page_with_download_url="http://www.7-zip.org/download. # -# #' @title Unzips a file using 7z -# #' @param page_with_download_url the URL of the FFmpeg download page. -# #' @param ... NOT used -# #' @return the shell output of 7z -# #' @references -# #' \url{http://stackoverflow.com/questions/14122732/unzip-files-7-zip-via-cmd-command} -# #' @examples -# #' \dontrun{ -# #' -# #' } +# # ' @title Unzips a file using 7z +# # ' @param page_with_download_url the URL of the FFmpeg download page. +# # ' @param ... NOT used +# # ' @return the shell output of 7z +# # ' @references +# # ' \url{http://stackoverflow.com/questions/14122732/unzip-files-7-zip-via-cmd-command} +# # ' @examples +# # ' \dontrun{ +# # ' +# # ' } # un7zip <- function(zip_file, the_7zip_path = "C:\\Program Files (x86)\\7-Zip\\",...) # { # shell(paste("'",the_7zip_path,"7z.exe' -x '", a_7z_filename, "'", sep = ""), intern = TRUE, translate = TRUE) @@ -919,10 +919,10 @@ install.ffmpeg <- function(...) install.FFmpeg(...) #' @title Returns the search path for executable files #' @export #' @description Returns the search path for executable files based on %PATH% -#' @param NONE #' @return A character vector with the search path for executable files #' @references -#' \url{http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true}#' @examples +#' \url{http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true} +#' @examples #' \dontrun{ #' system.PATH() # #' } @@ -932,13 +932,14 @@ system.PATH <- function() strsplit(shell("echo %PATH% ", intern= TRUE), ";")[[1] #' @description Checks the existence of an .exe extention in the search path for executable files #' @param exe_file a character with the name of the #' @return A boolean vector indication the existence of each program on the system. +#' @examples #' \dontrun{ -#' is.exe.installed(c("zip.exe", "Rgui.exe", "blablabla")) # [1] TRUE TRUE FALSE#' +#' is.exe.installed(c("zip.exe", "Rgui.exe", "blablabla")) # [1] TRUE TRUE FALSE #' is.exe.installed("7z") #' } is.exe.installed <- function(exe_file) { all_installed_exe <- list.files(system.PATH()) - exe_file %in% installed_exe + exe_file %in% all_installed_exe } # ' @title Extends the current path with more possible softwares diff --git a/R/os.manage.r b/R/os.manage.r index a62b515..7ca9593 100644 --- a/R/os.manage.r +++ b/R/os.manage.r @@ -85,7 +85,7 @@ os.sleep <- function(s=0, m=0, h=0, first_turn_hibernate_off = TRUE) { #' @param s time to wait before shutting down (in seconds), added to m and h; passed to \code{\link[base]{Sys.sleep}} #' @param m time to wait before shutting down (in minutes), added to s and h; passed to \code{\link[base]{Sys.sleep}} #' @param h time to wait before shutting down (in hours), added to s and m; passed to \code{\link[base]{Sys.sleep}} -#' @param first_turn_hibernate_on +#' @param first_turn_hibernate_on default is TRUE. This runs "powercfg -hibernate on" in order to turn hibernate on, in cases where it was off. #' @return The status code of \code{\link[base]{shell}}. #' @author Tal Galili #' @seealso \code{\link[base]{system}},\code{\link[base]{shell}}, \code{\link[base]{Sys.sleep}}, diff --git a/README.html b/README.html deleted file mode 100644 index ff25145..0000000 --- a/README.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - -installr - - - - - - - - - - - - - - - -

installr

- -

Introduction

- -

The installr package offers a set of R functions for the installation and updating of software (currently, only on Windows OS), with a special focus on R itself. This package has two main goals:

- -
    -
  1. To make updating R (on windows) as easy as running a function.
  2. -
  3. To make it as easy as possible to install all of the needed software for R development (such as git, RTools, etc), as well as for reproducible research using R (such as MikTeX, pandoc, etc).
  4. -
- -

Motivation

- -

While for Linux users, the installation process of new software may be just running a short line of code, for the regular Windows user it often includes browsing online, finding the latest version, downloading it, running the installer, and deleting the installation file. All of these steps are automatically done using functions in this package.

- -

Installation

- -

To install the stable version on CRAN:

- -
install.packages('installr')
-
- -

To install the GitHub version:

- -
if (!require('devtools')) install.packages('devtools')
-install_github('installr', 'talgalili')
-
- -

Usage

- -

If you are using the Rgui, you will see a new menu added on your top right (just by “help”), giving you the option to update R, or install new software.

- -

For command line use you can update R by running:

- -
require(installr)
-updateR() # this will open dialog boxes to take you through the steps.
-
- -

Or install a new software simply by running:

- -
require(installr)
-installr() #  user can easily select (via a GUI interface) a software to install.
-
- -

Contact

- -

You are welcome to:

- - - -

Available functions are:

- - - - - - - 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 3be5bcf..3defaab 100644 --- a/man/install.FFmpeg.Rd +++ b/man/install.FFmpeg.Rd @@ -1,18 +1,12 @@ \name{install.FFmpeg} -\alias{install.ffmpeg} \alias{install.FFmpeg} -\title{Unzips a file using 7z -#} +\alias{install.ffmpeg} +\title{Downloads and installs FFmpeg for windows} \usage{ install.FFmpeg(page_with_download_url = "http://ffmpeg.zeranoe.com/builds/", ...) } \arguments{ - \item{page_with_download_url}{the URL of the FFmpeg - download page. #} - - \item{...}{NOT used #} - \item{page_with_download_url}{the URL of the FFmpeg download page.} @@ -20,8 +14,6 @@ \link{install.URL}} } \value{ - the shell output of 7z # - NULL } \description{ @@ -32,8 +24,6 @@ the 7zip file and "run" it. } \details{ - # - FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec - the leading audio/video codec library. See @@ -44,14 +34,11 @@ package. } \examples{ -#\dontrun{ -# -#} +\dontrun{ +install.FFmpeg() # installs the latest version of FFmpeg +} } \references{ - #\url{http://stackoverflow.com/questions/14122732/unzip-files-7-zip-via-cmd-command} - # - \itemize{ \item FFmpeg homepage: \url{http://FFmpeg.org/} } } 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 17fc010..206bb30 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(page_with_download_url = "http://sourceforge.net/projects/graphicsmagick/", diff --git a/man/install.ImageMagick.Rd b/man/install.ImageMagick.Rd index 46e65af..acc22c0 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(page_with_download_url = "http://www.imagemagick.org/script/binary-releases.php", @@ -21,15 +21,15 @@ version of ImageMagick for Windows. } \details{ - ImageMagick® is a software suite to create, edit, - compose, or convert bitmap images. It can read and write - images in a variety of formats (over 100) including DPX, - EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, - SVG, and TIFF. Use ImageMagick to resize, flip, mirror, - rotate, distort, shear and transform images, adjust image - colors, apply various special effects, or draw text, - lines, polygons, ellipses and Bézier curves. This - function downloads Win32 dynamic at 16 bits-per-pixel. + ImageMagick is a software suite to create, edit, compose, + or convert bitmap images. It can read and write images in + a variety of formats (over 100) including DPX, EXR, GIF, + JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and + TIFF. Use ImageMagick to resize, flip, mirror, rotate, + distort, shear and transform images, adjust image colors, + apply various special effects, or draw text, lines, + polygons, ellipses and Bezier curves. This function + downloads Win32 dynamic at 16 bits-per-pixel. } \examples{ \dontrun{ 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.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 33a8570..206ee82 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/is.exe.installed.Rd b/man/is.exe.installed.Rd index ecbc4bd..f649634 100644 --- a/man/is.exe.installed.Rd +++ b/man/is.exe.installed.Rd @@ -9,12 +9,16 @@ } \value{ A boolean vector indication the existence of each program - on the system. \dontrun{ is.exe.installed(c("zip.exe", - "Rgui.exe", "blablabla")) # [1] TRUE TRUE FALSE#' - is.exe.installed("7z") } + on the system. } \description{ Checks the existence of an .exe extention in the search path for executable files } +\examples{ +\dontrun{ +is.exe.installed(c("zip.exe", "Rgui.exe", "blablabla")) # [1] TRUE TRUE FALSE +is.exe.installed("7z") +} +} diff --git a/man/os.hibernate.Rd b/man/os.hibernate.Rd index 20db1a7..6b3dced 100644 --- a/man/os.hibernate.Rd +++ b/man/os.hibernate.Rd @@ -18,7 +18,9 @@ added to s and m; passed to \code{\link[base]{Sys.sleep}}} - \item{first_turn_hibernate_on}{} + \item{first_turn_hibernate_on}{default is TRUE. This runs + "powercfg -hibernate on" in order to turn hibernate on, + in cases where it was off.} } \value{ The status code of \code{\link[base]{shell}}. diff --git a/man/system.PATH.Rd b/man/system.PATH.Rd index 993580d..fcec302 100644 --- a/man/system.PATH.Rd +++ b/man/system.PATH.Rd @@ -4,9 +4,6 @@ \usage{ system.PATH() } -\arguments{ - \item{NONE}{} -} \value{ A character vector with the search path for executable files @@ -21,6 +18,6 @@ system.PATH() # } } \references{ - \url{http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true}#' + \url{http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true} }