I realize this is basic, but I can't figure out the syntax for setting options for R Commander. I'm running Linux Mint and want to increase the R Commander font sizes. I see that there are (apparently command line) options to do so. I have a desktop launcher with the following command line: sh -c 'R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES Rcmdr" R "$@"' Can this be modified to override default font sizes? Alternatively, I've started Rcmdr from the terminal with R library(Rcmdr) but again, can't figure out where to insert the options settings to change the font size. Could someone provide the exact syntax to accomplish this? Sorry about the basic nature of the question - I've read everything I could find on the Web and it just keeps saying the same thing over and over. Thanks! -- View this message in context: http://r.789695.n4.nabble.com/R-Commander-options-tp4238183p4238183.html Sent from the R help mailing list archive at Nabble.com.
R Commander options
6 messages · Richard M. Heiberger, Michael Schmidt, John Fox
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111227/f3b591b5/attachment.pl>
Dear Rich and Michael, Thanks, Rich, for answering Michael's question. I'll just add that ?Commander (or "Help -> Commander help", from the Rcmdr menus) provides information about the available Rcmdr options. Best, John -------------------------------- John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
project.org] On Behalf Of Richard M. Heiberger
Sent: December-27-11 5:41 PM
To: Michael Schmidt
Cc: r-help at r-project.org
Subject: Re: [R] R Commander options
It is very easy.
Here is my Projector() function from library(RcmdrPlugin.HH)
Projector <- function() {
Rcmdr <- options()$Rcmdr
Projector.options <-
list(log.font.size = 15,
log.width = 54,
log.height = 6,
output.height = 18,
scale.factor = 1.4)
Rcmdr[names(Projector.options)] <- Projector.options
options(Rcmdr=Rcmdr)
trellis.par.set(list(superpose.symbol=list(
pch=rep(16,
length(trellis.par.get("superpose.symbol")$pch))),
plot.symbol=list(pch=16)))
par(pch=16)
putRcmdr("autoRestart", TRUE)
closeCommander(ask=FALSE)
Commander()
}
Projector()
I use it to set a large font for classroom presentations.
On Tue, Dec 27, 2011 at 3:57 PM, Michael Schmidt <
michaelschmidt0001 at gmail.com> wrote:
I realize this is basic, but I can't figure out the syntax for
setting
options for R Commander. I'm running Linux Mint and want to
increase
the R Commander font sizes. I see that there are (apparently
command
line) options to do so. I have a desktop launcher with the
following
command line: sh -c 'R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES Rcmdr" R "$@"' Can this be modified to override default font sizes? Alternatively, I've started Rcmdr from the terminal with R library(Rcmdr) but again, can't figure out where to insert the options settings to change the font size. Could someone provide the exact syntax to accomplish this? Sorry about the basic nature of the question - I've read everything
I
could find on the Web and it just keeps saying the same thing over
and over.
Thanks! -- View this message in context: http://r.789695.n4.nabble.com/R-Commander-options-
tp4238183p4238183.ht
ml Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html<http://www.r-
project.org/p
osting-guide.html> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111228/a3a7fe69/attachment.pl>
Dear Michael,
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- project.org] On Behalf Of Michael Schmidt Sent: December-28-11 2:12 PM To: r-help at r-project.org Subject: Re: [R] R Commander options Folks, Thanks for the help and I've used it as follows. I've created a .Rprofile file in my home directory and placed the following code in it: options(Rcmdr = list(default.font="*helvetica-medium-r-normal-*-15*", log.font.size = 15, log.width = 54, log.height = 6, output.height = 18, scale.factor = 1.4)) When I start Rcmdr with the desktop launcher, there are no error messages and the log font settings are correct. However, I was of the impression that the default.font setting would affect the GUI widgets, and that isn't happening. Am I mistaken?
No, default.font and default.font.size should affect the font used in Tk widgets. I just check on Mac OS X, and font definition doesn't seem to be working correctly -- I know that it did at some point in the past. On Windows systems, the scale.factor Rcmdr option still seems to work correctly; it never did work right on non-Windows systems. I'll look into this problem as soon as I have a chance. Thanks for the bug report, John
Again, thanks to all! Michael Schmidt -- View this message in context: http://r.789695.n4.nabble.com/R- Commander-options-tp4238183p4240767.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code.
Dear Michael, This ended up being more of a mess than I anticipated, but I think that I now have font selection working as advertised on both Windows and Mac OS X. I don't have a convenient Linux system to test on at the moment, but the Rcmdr should behave on Linux as on Mac OS X. (1) The default.font Rcmdr option now works on both Windows and non-Windows systems, but fonts are specified in Tk form; there's an example in ?Commander. (2) The default.font.size and log.font.size Rcmdr options control respectively the point-size of GUI elements and R input/output/messages. These too work on both Windows and non-Windows systems. On non-Windows systems the default.font.size option will generally be preferable to the default.font option; if both are specified, the latter is used. (3) The scale.factor option still doesn't work reliably on non-Windows systems. On Windows systems, in most cases, specifying scale.factor will be more convenient than specifying default.font.size and log.font.size. (4) The "Tools -> Options" dialog allows the user to set the default font size option on non-Windows systems and the scale factor option on Windows systems. I don't think that you previous option specifications would have done what you want even if the current version of the Rcmdr were working properly. In the new setup, I think you want something like options(Rcmdr = list(default.font.size=15, log.font.size = 15, log.width = 54, log.height = 6, output.height = 18, )) If you really want to scale up the fonts from 15 points by a factor of 1.4, use 21 points. All of these changes are in the development version 1.8-2 of the Rcmdr package on R-Forge. You should be able to get the most up-to-date version (now revision 173) via svn, or you can wait until R-Forge builds the source package, which is usually done daily (check the revision number at https://r-forge.r-project.org/R/?group_id=255). Please let me know whether this works properly for you now. I'm copying this response to Rich Heiberger, since the changes may affect him. Best, John -------------------------------- John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- project.org] On Behalf Of Michael Schmidt Sent: December-28-11 2:12 PM To: r-help at r-project.org Subject: Re: [R] R Commander options Folks, Thanks for the help and I've used it as follows. I've created a .Rprofile file in my home directory and placed the following code in it: options(Rcmdr = list(default.font="*helvetica-medium-r-normal-*-15*", log.font.size = 15, log.width = 54, log.height = 6, output.height = 18, scale.factor = 1.4)) When I start Rcmdr with the desktop launcher, there are no error messages and the log font settings are correct. However, I was of the impression that the default.font setting would affect the GUI widgets, and that isn't happening. Am I mistaken? Again, thanks to all! Michael Schmidt -- View this message in context: http://r.789695.n4.nabble.com/R- Commander-options-tp4238183p4240767.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code.