Displaying 20 results from an estimated 2000 matches similar to: "control L to clear the Rgui screen in Windows"
2009 May 03
2
clear screen?
I?ve been using this routine for several years. I?m sorry, I don?t remember
where I got it. It works as it should, viz. it blanks the R console. But
it requires package rcom and now that requires rscproxy.
cls <-
function ()
{
require(rcom)
wsh <- comCreateObject("Wscript.Shell")
comInvoke(wsh, "SendKeys", "\f")
invisible(wsh)
}
> cls()
2012 Mar 31
3
clear console
hi,
I use R - 2.15(32bit), and want to make a code to clear a console.
Actually, I used to run following code to do that but after update the
version of R from 2.14 to 2.15, it doesn't work.
cls <- function (t) {
require(RDCOMClient)
wsh <- COMCreate("Wscript.Shell")
wsh$SendKeys("\f")
invisible(wsh)
}
cls()
or
cls <-
2008 Aug 14
5
help with my sloppy syntax
R-ians:
After some effort I coerced my code to do what I want but my syntax is a
kludge. Suggestions on more elegant syntax?
par <- NIM.results$par
do.call("Draw.NIM.POD.curve", list(par[1], par[2], par[3], par[4],
par[5], a.hat.decision, .... et cetera ...
It seems that I should be able to avoid defining the variable "par" and then
specifying each of its elements,
2006 Mar 11
6
is there a formatted output in R?
something like "sprintf" in C?
so I can do:
print(sprintf("the correct result is %3.4f\n", myresult));
-------
Also, I am desperately looking for a "clear console screen" function in
R...
thanks a lot!
[[alternative HTML version deleted]]
2008 Sep 23
4
gsub difficulty
Greetings R-ians:
I know what doesn?t work but I don?t know why, nor how to remedy things.
I have a character string containing "." which I want to replace with " "
gsub(".", " ", file.label) replaces the every character with a blank.
However gsub(".xls", " ", file.label) replaces ".xls" with a blank as
expected.
It appears
2008 Jan 26
3
Which R version created a package?
Greetings, R-ians:
I would like to know which version or R was used to create a given package.
I think I remember seeing that topic discussed recently but cannot find it
among my notes. Can anyone tell me how to determine which version of R
created a package?
Thanks.
Charles Annis, P.E.
<mailto:Charles.Annis@StatisticalEngineering.com>
Charles.Annis@StatisticalEngineering.com
2006 Jul 09
4
string problems with "\\" (Windows)
Greetings, R-ians:
I'm using R 2.3.1 on WindowsXP.
I need to find the name of a file at the end of a sting that contains the
path + file, with the problematic "\\" as separators.
The string looks something like this:
"C:\\Documents and Settings\\myName\\My Documents\\R
Projects\\Project1\\file.name.csv"
What I want is "file.name.csv"
Currently I use the
2006 Jul 09
4
string problems with "\\" (Windows)
Greetings, R-ians:
I'm using R 2.3.1 on WindowsXP.
I need to find the name of a file at the end of a sting that contains the
path + file, with the problematic "\\" as separators.
The string looks something like this:
"C:\\Documents and Settings\\myName\\My Documents\\R
Projects\\Project1\\file.name.csv"
What I want is "file.name.csv"
Currently I use the
2008 Oct 05
2
trouble with character \u00e2
Greetings R-wizards:
For historical reasons I have filenames with the character "?" and have
successfully used "\u00e2" in its place, with the hoped-for result on all my
on-screen plots.
However since R2.7.0 I have trouble with savePlot() when the file name
includes that character as it does in this example:
savePlot(paste("diagnostic ? vs a ", file.label,
2009 Aug 26
1
Scripting - sort of
Dear R-ians:
I'm running R2.9.2 on a 6 year old Windows XP DELL with 2 Gig RAM and a 3MHz
Pentium 4 chip.
I've written a package using the User Menus Under Windows commands
(winMenuAdd, etc). It works very well.
I have 6 test cases and running any one of them requires many selections
form the menus and some keyboard entry, and it takes me hours to exercise
them all to see
2007 Dec 27
2
Running R from a CD on Windows?
Greetings, R-ians:
Yes it's easy to run R from a CD: I copied my windows installation folder to
the CD, then copied my R working directory to the CD.
To run from the CD, I copy the working directory from the CD to the desktop,
and then create an R desktop icon that points to Rgui.exe on the CD, and
starts in the working directory folder I just copied to the desktop.
The problem is that to
2008 Nov 15
1
HOW to provide a CITATION file?
Greetings, R-ians:
I am sure I am missing something obvious.
How do I provide a CITATION file for my home-brew package, so that it will
be packaged using
R CMD build --binary myPackage?
I have placed a CITATION file in the myPackage directory along with the
DESCRIPTION file, but it is ignored.
Thanks for your guidance.
Charles Annis, P.E.
Charles.Annis at StatisticalEngineering.com
2006 Mar 05
2
plotting partial deriviatives
Dear R Helpers:
I am trying to annotate a plot. The following code snippet works, but it is
kind of a kludge since it adds the partial derivative symbols after creating
the plotmath frac(). Is there a more elegant way to write a partial
derivative?
dev.off()
plot(NA, xlim=c(-3,3), ylim=c(0,1.6), xlab="", ylab="", tck=-0.015)
text(1.6, 1, expression(paste("slope =
2006 Aug 19
4
string-to-number
Greetings, Amigos:
I have been trying without success to convert a character string,
> repeated.measures.columns
[1] "3,6,10"
into c(3,6,10) for subsequent use.
as.numeric(repeated.measures.columns) doesn't work (likely because of the
commas)
[1] NA
Warning message:
NAs introduced by coercion
I've tried many things including
strsplit(repeated.measures.columns, split =
2006 Apr 21
4
programming advice?
Dear R-helpers:
I am doing some exploratory programming and am considering a routine that
has several other routines defined within it, so that I can avoid a large
and messy global re-programming to avoid naming conflicts.
My question is this: Because it is interpreted, does R have to re-build
these internal routines every time the new routine is called? I'm not
overly worried right now
2006 Oct 20
3
R-2.4.0 and MS Vista OS - installing packages
I have installed Microsoft Vista Release Candidate 1, and R-2.4.0, on a 4
year old DELL box with a 2.26 GHz P4 and 1 gig. It was a clean install ? R
is the only non-MS program running.
I cannot install packages from CRAN, nor from local zipped files. (I have
R-2.4.0 installed on a Windows XP machine and have had no problems so the
difficulty seems to be Vista not R, however they aren't
2006 Oct 20
3
R-2.4.0 and MS Vista OS - installing packages
I have installed Microsoft Vista Release Candidate 1, and R-2.4.0, on a 4
year old DELL box with a 2.26 GHz P4 and 1 gig. It was a clean install ? R
is the only non-MS program running.
I cannot install packages from CRAN, nor from local zipped files. (I have
R-2.4.0 installed on a Windows XP machine and have had no problems so the
difficulty seems to be Vista not R, however they aren't
2006 Aug 28
3
screen resolution effects on graphics
Greetings, R-Citizens:
I have the good fortune of working with a 19" 1280 X 1024 pixel monitor. My
R-code produces nice-looking graphics on this machine but the same code
results in crowded plots on an older machine with 800 X 600 resolution. In
hindsight this seems obvious, but I didn't anticipate it.
My code will be used on machines with varying graphics (and memory)
capacity. Is
2003 Jan 28
5
random number generator?
Dear R-Aficionados:
I realize that no random number generator is perfect, so what I report
below may be a result of that simple fact. However, if I have made an
error in my thinking I would greatly appreciate being corrected.
I wish to illustrate the behavior of small samples (n=10) and so
generate 100,000 of them.
n.samples <- 1000000
sample.size = 10
p <- 0.0001
z.normal <- qnorm(p)
2008 Apr 03
1
help with R semantics
Greetings:
I'm running R2.6.2 on a WinXP DELL box with 2 gig RAM.
I have created a new glm link function to be used with family = binomial.
The function works (although any suggested improvements would be welcome),
logit.FC <- function(POD.floor = 0, POD.ceiling =1)
{ if (POD.floor < 0 | POD.floor > 1) stop ("POD.floor must be between zero
and one.")
if