Displaying 20 results from an estimated 5000 matches similar to: "Fwd: RE: Macros versus functions"
2002 Nov 11
0
Macros and functions
The following failed to make it to r-help when Murray
Jorgensen sent his message a little time ago.
[It seems to have been an issue of the machine from which
my message originated.]
Typing in statements from the command line transfers to the
computer a macro that was perhaps in the user's head.
Putting together small sequences of carefully thought out code,
in which key components have been
2005 Feb 28
0
Re: R-help Digest, Vol 24, Issue 28
You've omitted a comma. races2000 is a data frame,
which for purposes of extracting rows behaves like
a 2-dimenional object. The following works fine:
hills2000 <- races2000[races2000$type == 'hill', ]
Additionally, you might like to ponder
> type <- races2000[names(races2000)=="type"]
> type[1:4]
Error in "[.data.frame"(type, 1:4) :
2005 Oct 01
2
Multiple expressions, when using substitute()
expression() accepts multiple expressions as arguments, thus:
plot(1:2, 1:2)
legend("topleft",
expression(y == a * x^b,
"where "* paste(y=="wood; ",
x=="dbh")))
Is there a way to do this when values are to be substituted
for a and b? i.e., the first element of the legend argument
to legend() becomes,
2005 Oct 13
1
arima: warning when fixing MA parameters.
I am puzzled by the warning message in the output below. It appears
whether or not I fit the seasonal term (but the precise point of doing
this was to fit what is effectively a second seasonal term). Is there
some deep reason why AR parameters
("Warning message: some AR parameters were fixed: ...")
should somehow intrude into the fitting of a model that has only MA
terms?
>
2004 Nov 10
1
Additions to the datasets package?
I have posted, at http://wwwmaths.anu.edu.au/~john/r/newsets/
image (.rda) files, and first stabs at .Rd files for various data on
deaths in London from 1629 to 1939. (There are of course gaps.)
The sources (Guy 1882 & Stocks 1942) are documented in the
.Rd files:
(1) poxetc: measles, smallpox & total deaths: 1629-1881
[I have deliberately left several inconsistencies that were
in
2005 Sep 30
0
R-help Digest, Vol 31, Issue 30
With lme4, use of mcmcsamp can be insightful. (Douglas Bates
drew my attention to this function in a private exchange of emails.)
The distributions of random effects are simulated on a log scale,
where the distributions are much closer to symmetry than on the
scale of the random effects themselves. As far as I can see, this is
a straightforward use of MCMC to estimate model parameters; it is
not
2005 Feb 21
1
is.matrix(), as.matrix, & as(,"matrix")
Under help(matrix) it is written:
'is.matrix' tests if its argument is a (strict) matrix. It is
generic: you can write methods to handle specific classes of
objects, see InternalMethods.
Further down, under "Details", the meaning of "strict" is explained
more explicitly:
'is.matrix' returns 'TRUE' if 'x' is a matrix
2004 Jan 24
1
Enhancement to termplot()
I'd like to make the following change to termplot():
Add panel=points as an extra parameter.
Replace
if (partial.resid)
points(xx, pres[, i], cex = cex, pch = pch, col = col.res,
...)
by
if (partial.resid)
panel(xx, pres[, i], cex = cex, pch = pch, col = col.res,
...)
Also, I think, add col.smooth, span and iter as named parameters; see
below.
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
The following works fine with the x11 device, though it
may well be that an initial plot is overwritten. With a pdf
or postscript device, I get two plots, the first of which
still has the red border from having the focus, while the
second is the plot that I want.
library(lattice); library(grid)
plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2)
print(plt)
2005 Mar 30
1
Base and lattice graphics on the same graphics page
Although base graphics does not mix with lattice in the one graph,
I've found that print.trellis(position=..., ) and the use of
par(fig=...)
to put regular and trellis graphics on the one graphics page works
like a treat, at least in version 2.0.1 of R. [Base graphics functions
that are themselves inconsistent with par(fig=...) are obviously
disallowed.]
I am wondering whether there are
2003 Mar 01
2
density(), with argument of length 1 (PR#2593)
The following is from version 1.6.2 of R under Windows,
or 1.6.1 under Mac OSX/X11
> density(1)
Error in if (!(lo <- min(hi, IQR(x)/1.34))) (lo <- hi) || (lo <- abs(x[1])) || :
missing value where logical needed
I am not sure how this should be handled. I encountered it
in connection with densityplot(). In that connection, it
might be enough to modify density() so that it
2004 Nov 21
1
Location of grobs etc on lattice output
Is there any way, after use of print.trellis(), to obtain the
co-ordinates of the plot region, e.g., in what are then the
native co-ordinates?
e.g.
library(DAAG)
library(lattice); library(grid)
data(cuckoos)
pushViewport(viewport(layout=grid.layout(2, 1)))
pushViewport(viewport(layout.pos.row=1))
cuckoos.strip <- stripplot(species ~ length, data=cuckoos)
print(cuckoos.strip,
2004 Mar 21
0
Solutions to Exercises - Data Analysis & Graphics Using R
This message is aimed at anyone who may be using
exercises from my book with John Braun for teaching
purposes. I am using this channel of communication
in the absence of any other obvious effective channel.
I ask the forbearance of list members.
Our intention is to post solutions to selected exercises
(the more challenging exercises) on the web, via a link
from
2003 Feb 11
0
Parallel Processing Interface for lapply()
In co-operation with Markus Hegland and myself, Zhongwen Ding
has written a package, based partly on Markus Hegland's code,
that provides a parallel processing interface to a remote
multi-processsor system. Pyro (Python Remote Objects) and R
must both be installed, both on the client machine and on the remote
server. The system uses rsync, with an ssh protocol, to handle
file transfer.
Once
2002 Jul 08
0
Re: Candid comment
Peter Dalgaard writes:
> Bill.Venables at cmis.csiro.au writes:
>
........
> > [WNV] Now there's an insight! In fact I think that once you get used to
> > the style you get to appreciate it. The commercial world substitutes
> > politeness for candour. True candour can be disconcerting but it does get
> > the message across much quicker.
> Also, this
2002 Jul 09
0
Re: Candid comment
<soap-box>
While I agree with John about abuse of methodology, I can't subscribe to
the "failure to read the manual" proposition.
I don't mean to lecture, but it would seem to me that people who, like me,
will probably gain far more from this list than we will be able to
contribute (at least in the near term) owe it to those who will likely
contribute far more than they
2004 Aug 18
0
Re: Thanks Frank, setting graph parameters, and why social scientists don't use R
There are answers that could and should be applied in specific
situations. At least in academia and in substantial research teams,
statisticians ought to have a prominent part in many of the research
teams. Senior statisticians should have a prominent role in deciding
the teams to which this applies. why should it be ok to do combine
high levels of chemical expertise with truly appalling
2004 Jan 04
0
termplot; failure to subset non-dataframe carriers (PR#6327)
termplot() does not carry subsetting over to carriers that
are in the environment but not in the data frame. This
generates a "subscript out of bounds" error.
> data(ToothGrowth)
> logdose <- log(ToothGrowth$dose)
> tooth.lm <- lm(len ~ logdose, data=ToothGrowth)
> termplot(tooth.lm) ## Works fine
> toothVC2.lm <- lm(len ~ poly(dose,2),
2005 Feb 22
1
Re: R-help Digest, Vol 24, Issue 22
You need to give the model formula that gave your output.
There are two sources of variation (at least), within and
between locations; though it looks as though your analysis
may have tried to account for this (but if so, the terms are
not laid out in a way that makes for ready interpretation.
The design is such (two locations) that you do not have
much of a check that effects are consistent over
2002 May 19
1
Hornet's Nests and Parallel Universes
Fisher is not the only person that it may be necessary
to read 4 or 5 times. The same may be the case for
side comments that Bill Venables is wont to make.
Now to the parallel universe that I have in mind. I wonder
whether the time is opportune for a list that focuses on
"Statistical Methodology for R Users". The difference from
other statistical methodology lists is that it will be