Skip to content

Commit c22de7e

Browse files
committed
updateR - added copy_Rprofile.site option. Requested by: rsuhada, leeper
1 parent 1121d3f commit c22de7e

8 files changed

Lines changed: 292 additions & 13 deletions

File tree

ChangeLog

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
* 2014-07-11(Tal Galili) R_version_in_a_folder - updated so it could handle "patched" versions of R. |42e35b7|
2-
| ChangeLog | 14 ++++++++++++++
1+
* 2014-07-27(talgalili) updateR - added copy_Rprofile.site option. Requested by: rsuhada, leeper |7871e9a|
2+
| DESCRIPTION | 4 ++--
3+
| NEWS | 14 ++++++++++++++
4+
| R/updateR.R | 21 +++++++++++++++++++--
5+
| man/rename_r_to_R.Rd | 2 +-
6+
| man/updateR.Rd | 15 +++++++++++----
7+
| 5 files changed, 47 insertions(+), 9 deletions(-)
8+
9+
* 2014-07-24(talgalili) Fix the ask=FALSE option in require2 |1121d3f|
10+
| R/install.R | 10 ++++++++--
11+
| 1 file changed, 8 insertions(+), 2 deletions(-)
12+
13+
* 2014-07-11(Tal Galili) R_version_in_a_folder - updated so it could handle "patched" versions of R. |3df8095|
14+
| ChangeLog | 22 ++++++++++++++++++++++
315
| DESCRIPTION | 4 ++--
416
| NEWS | 6 ++++++
517
| R/rename_r_to_R.R | 2 +-
618
| R/updateR.R | 1 +
7-
| 5 files changed, 24 insertions(+), 3 deletions(-)
19+
| 5 files changed, 32 insertions(+), 3 deletions(-)
820

921
* 2014-07-10(Tal Galili) bump to 0.15.6 |4ce9edc|
1022
| DESCRIPTION | 4 ++--

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: installr
22
Type: Package
33
Title: Using R to install stuff (such as: R, Rtools, RStudio, git, and more!)
4-
Version: 0.15.7
5-
Date: 2014-07-11
4+
Version: 0.15.9
5+
Date: 2014-07-27
66
Authors@R: c(person("Tal", "Galili", role = c("aut", "cre", "cph"), email =
77
"tal.galili@gmail.com", comment = "http://www.r-statistics.com"),
88
person("Barry", "Rowlingson", role = "ctb", email =

NEWS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
installr 0.15.9 (2014-07-27)
2+
---------------------------
3+
4+
UPDATED FUNCTIONS:
5+
* updateR - added copy_Rprofile.site option. Requested by: rsuhada, leeper (at: https://github.com/talgalili/installr/issues/13)
6+
7+
8+
installr 0.15.8 (2014-07-24)
9+
---------------------------
10+
11+
UPDATED FUNCTIONS:
12+
* require2 - fix ask=FALSE
13+
14+
115
installr 0.15.7 (2014-07-11)
216
---------------------------
317

NEWS.md

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,231 @@
1+
installr 0.15.9 (2014-07-27)
2+
---------------------------
3+
4+
UPDATED FUNCTIONS:
5+
* updateR - added copy_Rprofile.site option. Requested by: rsuhada, leeper (at: https://github.com/talgalili/installr/issues/13)
6+
7+
8+
installr 0.15.8 (2014-07-24)
9+
---------------------------
10+
11+
UPDATED FUNCTIONS:
12+
* require2 - fix ask=FALSE
13+
14+
15+
installr 0.15.7 (2014-07-11)
16+
---------------------------
17+
18+
UPDATED FUNCTIONS:
19+
* R_version_in_a_folder - updated so it could handle "patched" versions of R. (bug report thanks to rogerjbos i.e.: https://github.com/rogerjbos)
20+
21+
installr 0.15.6 (2014-07-10)
22+
---------------------------
23+
24+
OTHER NOTES:
25+
* Changed all R script files from .r to .R!
26+
27+
installr 0.15.5 (2014-07-04)
28+
---------------------------
29+
NEW FUNCTIONS:
30+
* rename_r_to_R - Rename files' extensions in a folder from .r to .R.
31+
32+
NEW FILES ADDED:
33+
* rename_r_to_R.R
34+
35+
installr 0.15.4 (2014-06-26)
36+
---------------------------
37+
38+
OTHER NOTES:
39+
* Changed the menu item to be "installr" instead of "Update" (in both zzz.r and startup.r)
40+
41+
42+
installr 0.15.3 (2014-06-14)
43+
---------------------------
44+
45+
OTHER NOTES:
46+
* Fixes to doc in kill_all_Rscript_s and uninstall.packages.
47+
* installr 0.15.3 is to be shipped to CRAN
48+
49+
50+
installr 0.15.2 (2014-06-14)
51+
---------------------------
52+
53+
BUG FIXES:
54+
* install.pandoc - works again. The guys there moved git from googlecode to github, with also a tweak where version numbers can include hyphens ("-").
55+
56+
57+
installr 0.15.1 (2014-06-14)
58+
---------------------------
59+
60+
NEW FUNCTIONS:
61+
* get_pid - get the process id by its name
62+
* kill_pid - kills the process of all the scripts with some pid
63+
* kill_process - kills process with some name
64+
65+
66+
BUG FIXES:
67+
* install.git - works again. The guys there moved git from googlecode to github. (props to Tom Bancroft for the bug report)
68+
69+
70+
installr 0.15.0 (2014-06-08)
71+
---------------------------
72+
73+
NEW FUNCTIONS:
74+
* get_tasklist - returns a data.frame with the current running processes. Windows only.
75+
* get_Rscript_PID - returns all of the process IDs (i.e.: PID) of the Rscript.exe that are running. Windows only.
76+
* kill_all_Rscript_s - kills the process of all the Rscript.exe that are running (you can schedule how long it should wait before doing it). Windows only.
77+
78+
79+
UPDATED FUNCTIONS:
80+
* install.URL - made sure to exit the function if it could not download the file
81+
82+
NEW FILES ADDED:
83+
* kill_pid.r
84+
85+
86+
OTHER NOTES:
87+
* Added copyrights to all .r files.
88+
89+
90+
installr 0.14.5 (2014-05-19)
91+
---------------------------
92+
93+
UPDATED FUNCTIONS: (by Boris Hejblum)
94+
* Update pkgDNLs_worldmapcolor
95+
Updating pkgDNLs_worldmapcolor function with ggplot2::aes_string (better
96+
for R CMD CHECK).
97+
Also, the 'data' directory of the package is not on the CRAN (but is on
98+
the github version of the package). pkgDNLs_worldmapcolor(...) needs the
99+
'WorldBordersData.RData' file in order to work.
100+
101+
installr 0.14.4 (2014-05-08)
102+
---------------------------
103+
UPDATED FUNCTIONS:
104+
* install.pandoc - the project has moved from http://code.google.com/p/pandoc/downloads/list to https://github.com/jgm/pandoc/releases - so the function had to be updated... (props to Patrick Kelley for the bug report)
105+
* install.url - tweaks to the massage.
106+
107+
installr 0.14.3 (2014-05-06)
108+
---------------------------
109+
UPDATED FUNCTIONS:
110+
* install.URL - added installer_option A character of the command line arguments
111+
* install.R, updaeR - added silent installation mode (source: http://hiratake55.wordpress.com/2014/05/01/how-to-do-a-silent-install-of-r/)
112+
113+
UPDATED DESCRIPTION:
114+
* Bump version to 0.14.3
115+
* added Takekatsu Hiramura as a contributor.
116+
117+
installr 0.14.2 (2014-04-17)
118+
---------------------------
119+
NEW FUNCTIONS ADDED:
120+
* uninstall.packages - removes packages from R.
121+
122+
123+
installr 0.14.1 (2014-04-12)
124+
---------------------------
125+
UPDATED FUNCTIONS:
126+
* download_RStudio_CRAN_data - added the override and massage parameters (makes sure we do not have to download files already downloaded)
127+
128+
129+
installr 0.14.0 (2014-04-02)
130+
---------------------------
131+
OTHER NOTES:
132+
* Bump version to 0.14.0 to signify the number of bug fixes from the original 0.13.0.
133+
* installr 0.14.0 is to be shipped to CRAN.
134+
135+
136+
installr 0.13.8 (2014-03-19)
137+
---------------------------
138+
UPDATED FUNCTIONS:
139+
* install.Cygwin - JackStat Fixed URL and added in 32 and 64 bit options. roxygenized
140+
141+
142+
installr 0.13.7 (2014-03-13)
143+
---------------------------
144+
UPDATED FUNCTIONS:
145+
* R_version_in_a_folder - Handled the case of using one directory for subsequent overwriting R installations by selecting the last one. Contributed by Dieter Menne.
146+
147+
148+
149+
installr 0.13.6 (2014-03-12)
150+
---------------------------
151+
152+
UPDATED FUNCTIONS:
153+
* install.URL - new parameters added:
154+
* massage (TRUE) parameter. The function now prints (cat) if the file was downloaded succesfully or not, combined with the location of the file. It also informs the user if the file is later installed/removed or not.
155+
* updateR, install.R - new parameters added:
156+
* keep_install_file parameter (default is FALSE). Based on the request by Boral here: http://www.r-statistics.com/2014/03/r-3-0-3-is-released/
157+
* install.URL, install.R, updateR - new parameters added:
158+
* download_dir (tempdir) character. Allowing the user to choose into which directory the file should be downloaded.
159+
160+
installr 0.13.5 (2014-03-01)
161+
---------------------------
162+
163+
UPDATED FUNCTIONS:
164+
* os.manage - shouldn't ask for minutes if no appropriate option was selected. Don't ask for minutes if 'Cancel' is selected or window was closed without selecting any option. Props to Kornelius Rohmeyer for the commit (rohmeyer@small-projects.de).
165+
166+
167+
installr 0.13.4 (2014-02-06)
168+
---------------------------
169+
170+
UPDATED FUNCTIONS:
171+
* install.pandoc -
172+
* if the installation failed, no need to ask about restarting the computer!
173+
* retiring "use_regex" from service. (props to Scott Milligan for the bug report.)
174+
175+
176+
installr 0.13.3 (2014-02-01)
177+
---------------------------
178+
179+
OTHER NOTES:
180+
* DESCRIPTION:
181+
* Fixed the usage of person()
182+
* minor tweaks to Title and Description
183+
* installr 0.13.3 is to be shipped to CRAN (thanks to the patient guidance of Uwe Ligges!)
184+
185+
installr 0.13.2 (2014-01-31)
186+
---------------------------
187+
188+
OTHER NOTES:
189+
* moved tools from imports to suggest in order to avoid "call not declared from" error.
190+
* Added "RdTags" as an internal function, since using tools:::RdTags caused too many problems.
191+
* Fixed a single "@" in a roxygen2 doc (which caused erros)
192+
* Changed main e-mail to be @gmail instead of @math.tau.ac.il.
193+
* installr 0.13.2 is to be shipped to CRAN.
194+
195+
196+
197+
installr 0.13.1 (2014-01-31)
198+
---------------------------
199+
200+
UPDATED FUNCTIONS:
201+
* read_RStudio_CRAN_data - Added a packages= option to read_RStudio_CRAN_data. read_RStudio_CRAN_data fails on out-of-memory (in the rbindlist call) if you've downloaded many RStudio CRAN logs. This patch adds a packages= option if you're only interested in a subset of packages, which subsets the daily log data on the fly. Other such filters might also be added.
202+
* Changed DESCRIPTION - removed maintainer (to be made automatically)
203+
204+
OTHER NOTES:
205+
* installr 0.13.1 is to be shipped to CRAN.
206+
207+
208+
installr 0.13.0 (2014-01-30)
209+
---------------------------
210+
211+
UPDATED FUNCTIONS:
212+
* 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...)
213+
214+
BUG FIXES:
215+
* 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.
216+
* README.md - some tweaks to work with the HTML option on CRAN.
217+
218+
OTHER NOTES:
219+
* installr 0.13.0 is to be shipped to CRAN.
220+
221+
222+
223+
installr 0.12.2 (2013-11-26)
224+
---------------------------
225+
UPDATED FUNCTIONS:
226+
* install.pandoc - added "to_restart" parameter. With a massage to remind the user they should restart their computer after pandoc is installed.
227+
228+
1229
installr 0.12.1 (2013-08-23)
2230
---------------------------
3231
BUG FIXES:
@@ -363,3 +591,4 @@ TODO for future releases:
363591
* install.Rpatch # TODO someday
364592
* install.python # TODO someday
365593
* install.java # with correct downloading for each type of windows R (version 32 or 64 bits...
594+
* install.qpdf - http://sourceforge.net/projects/qpdf/files/qpdf/

R/updateR.R

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ copy.packages.between.libraries <- function(from, to, ask =FALSE,keep_old = TRUE
645645
#' @param browse_news if TRUE (and if there is a newer version of R) - it opens the browser to the NEWS of the latest version of R, for the user to read through
646646
#' @param install_R TRUE/FALSE - if to install a new version of R (if one is available). If missing (this is the default) - the user be asked if to download R or not.Of course the installation part itself (the running of the .exe file) is dependent on the user.
647647
#' @param copy_packages TRUE/FALSE - if to copy your packages from the old version of R to the new version of R. If missing (this is the default) - the user will be asked for his preference (he should say yes, unless he is using a global library folder).
648+
#' @param copy_Rprofile.site logical - if to copy your Rprofile.site from the old version of R to the new version of R. If missing (this is the default) - the user will be asked for his preference (he should say yes, unless he is using a global library folder).
648649
#' @param update_packages TRUE/FALSE - if to update your packages in the new version of R (all packages will be updated without asking confirmation per package) If missing (this is the default) - the user will be asked for his preference (he should say yes, unless he is using a global library folder). This is done by calling the Rscript in the new R.
649650
#' @param keep_old_packages - if the keep the packages in the library of the old R installation. If missing (this is the default) - the user will be asked for his preference (he should say yes, unless he is using a global library folder).
650651
#' @param start_new_R TRUE/FALSE - if to start the new R (Rgui) after we will quit the old R. Default is TRUE. It will try to start the 64 bit R version, if it does not exist, the 32 bit will be started. This may be less useful for people using RStudio or the likes.
@@ -670,7 +671,8 @@ copy.packages.between.libraries <- function(from, to, ask =FALSE,keep_old = TRUE
670671
#'
671672
#' updateR() # will ask you what you want at every decision.
672673
#' }
673-
updateR <- function(browse_news, install_R, copy_packages, keep_old_packages, update_packages, start_new_R, quit_R, print_R_versions=TRUE, use_GUI = TRUE,
674+
updateR <- function(browse_news, install_R, copy_packages, copy_Rprofile.site,
675+
keep_old_packages, update_packages, start_new_R, quit_R, print_R_versions=TRUE, use_GUI = TRUE,
674676
to_checkMD5sums = TRUE, keep_install_file = FALSE, download_dir = tempdir(), silent = FALSE, ...) {
675677
# this function checks if we have the latest version of R
676678
# IF not - it notifies the user - and leaves.
@@ -699,7 +701,7 @@ updateR <- function(browse_news, install_R, copy_packages, keep_old_packages, u
699701
did_R_install <- install.R(to_checkMD5sums = to_checkMD5sums, keep_install_file = keep_install_file, download_dir = download_dir, silent = silent)
700702
if(!did_R_install) return(FALSE)
701703
new_R_path <- get.installed.R.folders()[1]
702-
704+
703705
# I could have also used:
704706
# if(unname(up_folder(new_R_path))!=unname(up_folder(old_R_path))) {
705707
# but if the new R is installed somehwere else, then when fetching
@@ -722,6 +724,21 @@ your packages to the new R installation.\n")
722724
# Next, copy (or MOVE):
723725
copy.packages.between.libraries(keep_old=keep_old_packages)
724726
}
727+
728+
729+
if(missing(copy_Rprofile.site)) copy_Rprofile.site <- ask.user.yn.question("Do you wish to copy your 'Rprofile.site' from the older version of R to the newer version of R?")
730+
731+
if(copy_Rprofile.site) {
732+
old_R_path_etc <- file.path(old_R_path, "etc")
733+
new_R_path_etc <- file.path(new_R_path, "etc")
734+
if("Rprofile.site" %in% list.files(old_R_path_etc)) {
735+
file.copy(from = file.path(old_R_path_etc, "Rprofile.site"),
736+
to = file.path(new_R_path_etc, "Rprofile.site"))
737+
} else {
738+
warning('"Rprofile.site" does not exist in your old R-etc folder')
739+
}
740+
}
741+
725742

726743
# should we update_packages?
727744
if(missing(update_packages)) update_packages <- ask.user.yn.question("Do you wish to update your packages in the newely installed R? ", use_GUI = use_GUI)

R/zzz.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ installrWelcomeMessage <- function(){
204204
# check()
205205
# check(args="--as-cran")
206206
# Thanks to: http://stackoverflow.com/questions/10017702/r-cmd-check-options-for-more-rigorous-testing-2-15-0
207-
# file.copy("NEWS", "NEWS.md")
207+
# file.copy("NEWS", "NEWS.md", overwrite = TRUE)
208208
# build_win(version = "R-devel")
209209
# release(check = TRUE)
210210

man/rename_r_to_R.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ rename_r_to_R(recursive = TRUE, massage = FALSE) # Changes
4949
# ALL of the .r files underneath the current
5050
# working directory
5151

52-
52+
# source: http://stackoverflow.com/questions/52950/how-to-make-git-ignore-changes-in-case
5353
# First run the following in git bash:
5454
# git config core.ignorecase false
5555
rename_r_to_R(recursive = TRUE, text_to_find="\\\\.R$", new_extension = ".b")

man/updateR.Rd

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
\alias{updateR}
44
\title{Checks for the latest R version, and if there is a newer version of R - downloads and installs it.}
55
\usage{
6-
updateR(browse_news, install_R, copy_packages, keep_old_packages,
7-
update_packages, start_new_R, quit_R, print_R_versions = TRUE,
8-
use_GUI = TRUE, to_checkMD5sums = TRUE, keep_install_file = FALSE,
9-
download_dir = tempdir(), silent = FALSE, ...)
6+
updateR(browse_news, install_R, copy_packages, copy_Rprofile.site,
7+
keep_old_packages, update_packages, start_new_R, quit_R,
8+
print_R_versions = TRUE, use_GUI = TRUE, to_checkMD5sums = TRUE,
9+
keep_install_file = FALSE, download_dir = tempdir(), silent = FALSE,
10+
...)
1011
}
1112
\arguments{
1213
\item{browse_news}{if TRUE (and if there is a newer
@@ -25,6 +26,12 @@ updateR(browse_news, install_R, copy_packages, keep_old_packages,
2526
asked for his preference (he should say yes, unless he is
2627
using a global library folder).}
2728

29+
\item{copy_Rprofile.site}{logical - if to copy your
30+
Rprofile.site from the old version of R to the new
31+
version of R. If missing (this is the default) - the user
32+
will be asked for his preference (he should say yes,
33+
unless he is using a global library folder).}
34+
2835
\item{update_packages}{TRUE/FALSE - if to update your
2936
packages in the new version of R (all packages will be
3037
updated without asking confirmation per package) If

0 commit comments

Comments
 (0)