Permalink
Browse files

Updated some functions and documents in order to pass CRAN checks: RS…

…tudio_CRAN_data_folder, pkgDNLs_worldmapcolor, fetch_tag_from_Rd, add_to_.First_in_Rprofile.site, remove_from_.First_in_Rprofile.site, add_load_installr_on_startup_menu,README.md
  • Loading branch information...
1 parent d307866 commit 8f58a40893ff2cfc365c47a2ccaa4b01eb6094de @talgalili committed Jan 30, 2014
Showing with 931 additions and 944 deletions.
  1. +0 −10 DESCRIPTION
  2. +5 −0 NEWS
  3. +21 −5 R/RStudio_CRAN_data.r
  4. +1 −1 R/install.r
  5. +0 −1 R/os.manage.r
  6. +5 −7 R/startup.r
  7. +1 −1 R/zzz.r
  8. +48 −49 README.md
  9. +9 −9 man/R_version_in_a_folder.Rd
  10. +9 −9 man/add.installr.GUI.Rd
  11. +6 −2 man/add_load_installr_on_startup_menu.Rd
  12. +6 −2 man/add_remove_installr_from_startup_menu.Rd
  13. +7 −10 man/add_to_.First_in_Rprofile.site.Rd
  14. +15 −16 man/ask.user.for.a.row.Rd
  15. +9 −10 man/ask.user.yn.question.Rd
  16. +11 −12 man/barplot_package_users_per_day.Rd
  17. +5 −6 man/browse.latest.R.NEWS.Rd
  18. +9 −9 man/check.for.updates.R.Rd
  19. +8 −8 man/check.integer.Rd
  20. +7 −7 man/checkMD5sums2.Rd
  21. +17 −18 man/copy.packages.between.libraries.Rd
  22. +30 −34 man/cranometer.Rd
  23. +4 −4 man/create.global.library.Rd
  24. +11 −11 man/download_RStudio_CRAN_data.Rd
  25. +10 −10 man/fetch_tag_from_Rd.Rd
  26. +10 −10 man/file.name.from.url.Rd
  27. +12 −12 man/format_RStudio_CRAN_data.Rd
  28. +13 −14 man/freegeoip.Rd
  29. +12 −13 man/get.installed.R.folders.Rd
  30. +25 −26 man/install.7zip.Rd
  31. +7 −8 man/install.Cygwin.Rd
  32. +15 −20 man/install.FFmpeg.Rd
  33. +10 −9 man/install.GitHub.Rd
  34. +16 −16 man/install.GraphicsMagick.Rd
  35. +16 −15 man/install.ImageMagick.Rd
  36. +14 −13 man/install.LaTeX2RTF.Rd
  37. +18 −18 man/install.LyX.Rd
  38. +15 −16 man/install.MikTeX.Rd
  39. +14 −13 man/install.R.Rd
  40. +12 −11 man/install.RStudio.Rd
  41. +11 −10 man/install.Rdevel.Rd
  42. +20 −21 man/install.Rtools.Rd
  43. +15 −14 man/install.SWFTools.Rd
  44. +14 −15 man/install.URL.Rd
  45. +8 −9 man/install.git.Rd
  46. +20 −19 man/install.notepadpp.Rd
  47. +20 −19 man/install.npptor.Rd
  48. +18 −18 man/install.packages.zip.Rd
  49. +14 −14 man/install.pandoc.Rd
  50. +11 −11 man/installr.Rd
  51. +7 −7 man/is.RStudio.Rd
  52. +8 −8 man/is.Rgui.Rd
  53. +10 −10 man/is.empty.Rd
  54. +5 −5 man/is.exe.installed.Rd
  55. +10 −10 man/is.windows.Rd
  56. +7 −10 man/is_in_.First_in_Rprofile.site.Rd
  57. +12 −12 man/lineplot_package_downloads.Rd
  58. +9 −8 man/load_installr_on_startup.Rd
  59. +9 −9 man/most_downloaded_packages.Rd
  60. +7 −7 man/myip.Rd
  61. +12 −13 man/os.hibernate.Rd
  62. +12 −12 man/os.lock.Rd
  63. +14 −14 man/os.manage.Rd
  64. +12 −12 man/os.restart.Rd
  65. +18 −18 man/os.shutdown.Rd
  66. +13 −14 man/os.sleep.Rd
  67. +13 −13 man/package_authors.Rd
  68. +12 −12 man/pkgDNLs_worldmapcolor.Rd
  69. +12 −13 man/read_RStudio_CRAN_data.Rd
  70. +5 −5 man/remove.installr.GUI.Rd
  71. +10 −14 man/remove_from_.First_in_Rprofile.site.Rd
  72. +8 −8 man/require2.Rd
  73. +4 −4 man/restart_RGui.Rd
  74. +9 −8 man/rm_installr_from_startup.Rd
  75. +17 −18 man/source.https.Rd
  76. +6 −6 man/system.PATH.Rd
  77. +5 −6 man/turn.number.version.Rd
  78. +5 −5 man/turn.version.to.number.Rd
  79. +5 −5 man/turn.version.to.number1.Rd
  80. +8 −8 man/uninstall.R.Rd
  81. +4 −4 man/up_folder.Rd
  82. +29 −31 man/updateR.Rd
View
@@ -44,13 +44,3 @@ Suggests:
plyr,
ggplot2
License: GPL-2
-Collate:
- 'create.global.library.r'
- 'install.r'
- 'updateR.r'
- 'os.manage.r'
- 'geo_functions.r'
- 'RStudio_CRAN_data.r'
- 'is.x.r'
- 'startup.r'
- 'zzz.r'
View
5 NEWS
@@ -4,10 +4,15 @@ installr 0.13.0 (2014-01-30)
UPDATED FUNCTIONS:
* make checkMD5 issue warnings (maybe with a dialog box) instead of errors (since the current state of affairs is more hassle than it is worth...)
+BUG FIXES:
+ * Updated some functions and documents in order to pass CRAN checks: RStudio_CRAN_data_folder, pkgDNLs_worldmapcolor, fetch_tag_from_Rd, add_to_.First_in_Rprofile.site, remove_from_.First_in_Rprofile.site, add_load_installr_on_startup_menu.
+ * README.md - some tweaks to work with the HTML option on CRAN.
+
OTHER NOTES:
* installr 0.13.0 is to be shipped to CRAN.
+
installr 0.12.2 (2013-11-26)
---------------------------
UPDATED FUNCTIONS:
View
@@ -353,7 +353,7 @@ most_downloaded_packages <- function(dataset, n = 6L,...) {
#' @author Boris Hejblum
#' @return a ggplot object
#' @source \url{http://www.nicebread.de/finally-tracking-cran-packages-downloads/}
-#' @seealso \link{download_RStudio_CRAN_data}, \link{read_RStudio_CRAN_data}, \link{barplot_package_users_per_day}, \link{ggplot}
+#' @seealso \link{download_RStudio_CRAN_data}, \link{read_RStudio_CRAN_data}, \link{barplot_package_users_per_day}, \link[ggplot2]{ggplot}
#' @examples
#' \dontrun{
#' # The first two functions might take a good deal of time to run (depending on the date range)
@@ -369,9 +369,9 @@ most_downloaded_packages <- function(dataset, n = 6L,...) {
#'
#' }
pkgDNLs_worldmapcolor <- function(pkg_name, dataset, remove_dups=TRUE, ...){
- require2(ggplot2)
- require2(data.table)
- require2(sp)
+ require2("ggplot2")
+ require2("data.table")
+ require2("sp")
data <- dataset[which(dataset$package == pkg_name),]
if(remove_dups){
@@ -382,7 +382,7 @@ pkgDNLs_worldmapcolor <- function(pkg_name, dataset, remove_dups=TRUE, ...){
names(counts) <- c("country", "count")
- data(WorldBordersData) #loading the world map definition file
+ data("WorldBordersData") #loading the world map definition file
# downloaded as a shapefile of the world map from Natural Earth:
# http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# and unzip it in the 'shp.file.repos' repository
@@ -391,6 +391,22 @@ pkgDNLs_worldmapcolor <- function(pkg_name, dataset, remove_dups=TRUE, ...){
# ISO_full[146] <- "SOM" # The iso identifier for the Republic of Somaliland is missing
# ISO_full[89] <- "KV" # as for the Republic of Kosovo
# ISO_full[39] <- "CYP" # as for Cyprus
+
+
+ # solving the following:
+ # pkgDNLs_worldmapcolor: no visible binding for global variable 'long'
+ # This doesn't work:
+# if(getRversion() >= "2.15.1") utils::globalVariables(
+# c("ISO_full","long","lat","group","dnls")
+# )
+ # this does...
+ # http://stackoverflow.com/questions/8096313/no-visible-binding-for-global-variable-note-in-r-cmd-check
+ ISO_full <- get("ISO_full")
+ long <- get("long")
+ lat <- get("lat")
+ group <- get("group")
+ dnls <- get("dnls")
+
colcode <- numeric(length(ISO_full))
names(colcode) <- ISO_full
View
@@ -1293,7 +1293,7 @@ fetch_tag_from_Rd <- function(package, tag = "\\author",...){
#' @param package a character string of the package we are interested in.
#' @param to_strsplit logical (TRUE). Should the authors strings be split
#' (in cases of a "and" or a comma ",")?
-#' @param split a character scalar to be passed to \link{strsplt} split paramter.
+#' @param split a character scalar to be passed to \link{strsplit} split paramter.
#' default is c(",|and)
#' @param to_table logical (FALSE). Should the authors strings be listed in a
#' table - showing a count of how many .Rd files they were listed in?
View
@@ -1,4 +1,3 @@
-
#' @title Shut down the operating system with the command `shutdown'
#' @export
#' @description
View
@@ -71,10 +71,8 @@ add_to_.First_in_Rprofile.site <- function(code, indent = "\t", ... ) {
#' Goes through Rprofile.site text, finds a line of code - and removes it.
#' @param code A character scalar with code to add at the beginning of the
#' .First function in Rprofile.site
-#' @param indent a character scalar indicating the text to be added before
-#' code. Default is a tab.
-#' @param ... passed to \link{grep}
#' @param fixed passed to \link{grep}
+#' @param ... passed to \link{grep}
#' @return logical. Did we remove that line or not (in case it was not there)
#' @references
#' \url{http://stackoverflow.com/questions/1395301/how-to-get-r-to-recognize-your-working-directory-as-its-working-directory}
@@ -118,8 +116,6 @@ remove_from_.First_in_Rprofile.site <- function(code, fixed = TRUE, ... ) {
#' Goes through
#' @param code A character scalar with code to add at the beginning of the
#' .First function in Rprofile.site
-#' @param indent a character scalar indicating the text to be added before
-#' code. Default is a tab.
#' @param fixed passed to \link{grep}
#' @param ... passed to \link{grep}
#' @return logical, if code is in Rprofile.site or not.
@@ -160,6 +156,7 @@ is_in_.First_in_Rprofile.site <- function(code, fixed= TRUE, ... ) {
#' Add menu item for having installr load on startup
+#' @param ... not used. (but good for future backward compatibility)
#' @export
add_load_installr_on_startup_menu <- function(...) {
@@ -195,6 +192,7 @@ add_load_installr_on_startup_menu <- function(...) {
#' Add menu item for having installr NOT load on startup
+#' @param ... not used. (but good for future backward compatibility)
#' @export
add_remove_installr_from_startup_menu <- function(...) {
@@ -243,7 +241,7 @@ add_remove_installr_from_startup_menu <- function(...) {
#' @title Have the installr package load on startup
#' @export
-#' @param ... not used.
+#' @param ... not used. (but good for future backward compatibility)
#' @return invisible(NULL)
#' @references
#' \url{http://stackoverflow.com/questions/1395301/how-to-get-r-to-recognize-your-working-directory-as-its-working-directory}
@@ -265,7 +263,7 @@ load_installr_on_startup <- function(...) {
#' @title Have the installr package NOT load on startup
#' @export
-#' @param ... not used.
+#' @param ... not used. (but good for future backward compatibility)
#' @return invisible(NULL)
#' @references
#' \url{http://stackoverflow.com/questions/1395301/how-to-get-r-to-recognize-your-working-directory-as-its-working-directory}
View
@@ -103,7 +103,7 @@ remove.installr.GUI <- function() {
installrWelcomeMessage <- function(){
paste("\n",
- "Welcome to installr version ", utils:::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",
View
@@ -27,7 +27,7 @@ if (!require('devtools')) install.packages('devtools'); require('devtools')
# make sure you have Rtools installed first! if not, then run:
#install.packages('installr')
#install_Rtools()
-install_github('installr', 'talgalili')
+install_github('talgalili/installr')
```
## Usage
@@ -54,72 +54,71 @@ installr() # user can easily select (via a GUI interface) a software to install
You are welcome to:
* submit suggestions and bug-reports at: <https://github.com/talgalili/installr/issues>
-
* send a pull request on: <https://github.com/talgalili/installr/>
-
* compose a friendly e-mail to: <tal.galili@gmail.com>
## Available functions are:
You can see the most recent changes to the package in the NEWS.md file:
-- https://github.com/talgalili/installr/blob/master/NEWS.md
+https://github.com/talgalili/installr/blob/master/NEWS.md
* R install/update/uninstall related functions:
- * updateR() - serves as a "check for updates" function of R itself. Running the function will check for a newer version of R than the one currently used. If one exists, the function will download the most updated R version and run its installer. Once done, the function will offer to copy (or move) all of the packages from the old R library to the new R library. It will then offer to update the moved packages, offer to open the new Rgui, and lastely, it will quit the old R.
- * uninstall.R
- * require2 - just like "require", only makes sure to download and install the package in case it is not present on the system (useful for examples...)
- * restart_RGui - a function to restart Rgui from Rgui
- * check.for.updates.R
- * install.R
- * install.Rdevel - usefull for when developing R packages (as this version contains the latest checks.)
-
+ * updateR() - serves as a "check for updates" function of R itself. Running the function will check for a newer version of R than the one currently used. If one exists, the function will download the most updated R version and run its installer. Once done, the function will offer to copy (or move) all of the packages from the old R library to the new R library. It will then offer to update the moved packages, offer to open the new Rgui, and lastely, it will quit the old R.
+ * uninstall.R
+ * require2 - just like "require", only makes sure to download and install the package in case it is not present on the system (useful for examples...)
+ * restart_RGui - a function to restart Rgui from Rgui
+ * check.for.updates.R
+ * install.R
+ * install.Rdevel - usefull for when developing R packages (as this version contains the latest checks.)
* Installing software from withing R:
- * install.RStudio() - download and runs the installer for RStudio.
- * install.Rtools() - download and runs the installer for Rtools (allowing the user to choose which version to download)
- * install.pandoc() - download and runs the installer for pandoc.
- * install.MikTeX() - download and runs the installer for MikTeX.
- * install.git() - download and runs the installer for git-gui.
- * install.packages.zip() - for installing package from a url of a ZIP file. Currently, it is the only option I know of for downloading+installing a direct ZIP of an R package.
- * install.URL() - gets a URL of a zipped file, and makes sure to download and run it.
- * install.LyX()
- * install.LaTeX2RTF()
- * install.GitHub()
- * install.ImageMagick()
- * install.GraphicsMagick()
- * install.SWFTools()
- * install.FFmpeg()
- * install.7zip()
- * install.notepadpp()
- * install.npptor()
- * install.Cygwin()
+ * install.RStudio() - download and runs the installer for RStudio.
+ * install.Rtools() - download and runs the installer for Rtools (allowing the user to choose which version to download)
+ * install.pandoc() - download and runs the installer for pandoc.
+ * install.MikTeX() - download and runs the installer for MikTeX.
+ * install.git() - download and runs the installer for git-gui.
+ * install.packages.zip() - for installing package from a url of a ZIP file. Currently, it is the only option I know of for downloading+installing a direct ZIP of an R package.
+ * install.URL() - gets a URL of a zipped file, and makes sure to download and run it.
+ * install.LyX()
+ * install.LaTeX2RTF()
+ * install.GitHub()
+ * install.ImageMagick()
+ * install.GraphicsMagick()
+ * install.SWFTools()
+ * install.FFmpeg()
+ * install.7zip()
+ * install.notepadpp()
+ * install.npptor()
+ * install.Cygwin()
* Operation system managing functions
- * manage.os() - for shutdown/sleep of a Windows computer (useful for running at the end of a simulation). Controls all the following functions.
- * os.hibernate()
- * os.lock()
- * os.restart()
- * os.shutdown()
- * os.sleep()
- * is.Rgui()
- * is.RStudio()
- * is.windows()
+ * manage.os() - for shutdown/sleep of a Windows computer (useful for running at the end of a simulation). Controls all the following functions.
+ * os.hibernate()
+ * os.lock()
+ * os.restart()
+ * os.shutdown()
+ * os.sleep()
+ * is.Rgui()
+ * is.RStudio()
+ * is.windows()
* CRAN and network related functions:
- * cranometer - Estimates the speed of each CRAN mirror by measuring the time it takes to download the NEWS file.
- * myip - return your ip address.
- * freegeoip - Geolocate IP addresses in R (contributed by Heuristic Andrew)
- * download_RStudio_CRAN_data
- * read_RStudio_CRAN_data
- * barplot_package_users_per_day
- * lineplot_package_downloads
- * format_RStudio_CRAN_data
- * most_downloaded_packages
+ * cranometer - Estimates the speed of each CRAN mirror by measuring the time it takes to download the NEWS file.
+ * myip - return your ip address.
+ * freegeoip - Geolocate IP addresses in R (contributed by Heuristic Andrew)
+ * download_RStudio_CRAN_data
+ * read_RStudio_CRAN_data
+ * barplot_package_users_per_day
+ * lineplot_package_downloads
+ * format_RStudio_CRAN_data
+ * most_downloaded_packages
* Misc functions:
- * is.empty - function added for checking if an object is empty (e.g: of zero length)
+ * is.empty - function added for checking if an object is empty (e.g: of zero length)
+
+* There are a few more functions that you could see in the help files...
@@ -2,22 +2,22 @@
\alias{R_version_in_a_folder}
\title{Get the version of the R installed in a folder}
\usage{
- R_version_in_a_folder(folder)
+R_version_in_a_folder(folder)
}
\arguments{
\item{folder}{The folder for which we wish to know the R
version.}
}
\value{
- Returns a character vector of the R version (or NA, if
- this is not an R installation folder)
+Returns a character vector of the R version (or NA, if this
+is not an R installation folder)
}
\description{
- Get the version of the R installed in a folder based on
- the structure of the filename README.R-... (where ... is
- a version number for R). This function helps detect the
- version number of an R installation even if the name of
- the folder is not standard.
+Get the version of the R installed in a folder based on the
+structure of the filename README.R-... (where ... is a
+version number for R). This function helps detect the
+version number of an R installation even if the name of the
+folder is not standard.
}
\examples{
\dontrun{
@@ -26,6 +26,6 @@ R_version_in_a_folder(R.home())
}
}
\seealso{
- \link{get.installed.R.folders}
+\link{get.installed.R.folders}
}
View
@@ -2,29 +2,29 @@
\alias{add.installr.GUI}
\title{Adds a menu based GUI for updating R within Rgui}
\usage{
- add.installr.GUI()
+add.installr.GUI()
}
\value{
- Returns invisible TRUE/FALSE if menus were added or not.
+Returns invisible TRUE/FALSE if menus were added or not.
}
\description{
- Adds a menu based GUI for updating R within Rgui.
+Adds a menu based GUI for updating R within Rgui.
}
\details{
- This function is used during .onLoad to load the menus
- for the installr package in Rgui.
+This function is used during .onLoad to load the menus for
+the installr package in Rgui.
}
\examples{
\dontrun{
add.installr.GUI()
}
}
\author{
- Tal Galili, Dason
+Tal Galili, Dason
}
\references{
- My thanks goes to Yihui and Dason, for the idea and help
- with implementation. See also:
- \url{http://stackoverflow.com/questions/15250487/how-to-add-a-menu-item-to-rgui/}
+My thanks goes to Yihui and Dason, for the idea and help
+with implementation. See also:
+\url{http://stackoverflow.com/questions/15250487/how-to-add-a-menu-item-to-rgui/}
}
@@ -2,9 +2,13 @@
\alias{add_load_installr_on_startup_menu}
\title{Add menu item for having installr load on startup}
\usage{
- add_load_installr_on_startup_menu(...)
+add_load_installr_on_startup_menu(...)
+}
+\arguments{
+ \item{...}{not used. (but good for future backward
+ compatibility)}
}
\description{
- Add menu item for having installr load on startup
+Add menu item for having installr load on startup
}
Oops, something went wrong.

0 comments on commit 8f58a40

Please sign in to comment.