Displaying 20 results from an estimated 20000 matches similar to: "RSiteSearch() not in posting guide"
2004 Nov 04
3
sub- and superscript in plot labels
Dear List,
I need to add a subscript and a superscript to some of the ions in the
labels on some plots.
I have got to here but now I'm stuck:
plot(1:10, xlab = expression(paste("nm SO"[4], " ", mu, "eq cm"^{-2}, "
yr"^{-1})))
Which gives almost what I require. No matter what I tried, however, I
could not get bot a sub script *and* a superscript
2005 Aug 03
1
deparse(substitute(x)) and S3 methods
Dear List,
I have the following function:
coca <- function(x, ...)
{
if(is.null(class(x))) class(x) <- data.class(x)
UseMethod("coca", x)
}
and a default method
coca.default <- function(x, y, method = c("predictive", "symmetric"),
reg.method = c("simpls", "eigen"), weights =
NULL,
2005 Aug 16
4
as.character and a formula
Dear list,
given this formula:
> fmla <- formula(y1 ~ spp1 + spp2 + spp3 + spp5)
> fmla[[3]]
spp1 + spp2 + spp3 + spp5
is this the intended behaviour of as.character:
> as.character(fmla[[3]])
[1] "+" "spp1 + spp2 + spp3" "spp5"
? Where does the extra "+" come from?
> as.character(fmla)
[1] "~"
2005 Aug 02
1
problem using evaluating a formula
##data
y1 <- matrix(c(3,1,0,1,0,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1),
nrow = 5, byrow = TRUE)
y2 <- matrix(c
(3,0,10,3,3,0,0,1,1,0,0,0,0,0,1,0,1,0,0,2,1,0,1,1,0,2,1,1,4,1),
nrow = 5, byrow = TRUE)
y1 <- as.data.frame(y1)
y2 <- as.data.frame(y2)
rownames(y1) <- rownames(y2) <- paste("site", 1:5, sep = "")
colnames(y1) <-
2005 Apr 06
1
axis.Date problem, bug(?)
Dear List,
I have the following problem with axis.Date, here is an artificial example:
dates <- scan(what = "character")
"25/03/2000" "26/03/2000" "27/03/2000" "28/03/2000" "29/03/2000"
"30/03/2000" "31/03/2000" "01/04/2000" "02/04/2000" "03/04/2000"
"04/04/2000"
2005 Nov 03
4
merging dataframes
Dear List,
I often have to merge two or more data frames containing unique row
names but with some columns (names) common to the two data frames and
some columns not common. This toy example will explain the kind of setup
I am talking about:
mat1 <- as.data.frame(matrix(rnorm(20), nrow = 5))
mat2 <- as.data.frame(matrix(rnorm(20), nrow = 4))
rownames(mat1) <- paste("site",
2004 Jun 11
2
Sweave and multiple graphs
Dear list,
I am using Sweave to build a small report. I want to produce a series of
figures, each figure containing a number of plots and then have them
included in the Sweave file.
An example would be to :
postscript(file = "ANCbwplot%03d.eps", onefile = FALSE, other options...)
oldpar <- par(mfrow = c(2,2))
....
do lots of plots to produce a number of eps files
....
par(oldpar)
2006 Jan 21
1
Bug in xy.coords() or documentation error?
Hi,
I noticed the following problem with xy.coords() in R 2.2.1-patched
(version info at the foot of this email) and R 2.3.0 unstable
(subversion no: r37123):
> xy.coords(x = matrix(1:20, ncol = 2))
Error in xy.coords(x = matrix(1:20, ncol = 2)) :
argument "y" is missing, with no default
> xy.coords(x = matrix(1:20, ncol = 2), y = NULL)
$x
[1] 1 2 3 4 5 6 7 8 9
2005 Aug 16
2
problem using model.frame()
Hi I'm having a problem with model.frame, encapsulated in this example:
y1 <- matrix(c(3,1,0,1,0,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1),
nrow = 5, byrow = TRUE)
y1 <- as.data.frame(y1)
rownames(y1) <- paste("site", 1:5, sep = "")
colnames(y1) <- paste("spp", 1:4, sep = "")
y1
model.frame(~ y1)
Error in model.frame(formula, rownames,
2003 Dec 18
3
R GUI dies using postcript() in Windows XP Pro
Dear List,
My colleague has been having a problem with the following data and
plotting commands. The example below is part of a larger set of plots,
but I've isolated the problem to this example using this small dataset
(below), which kills rgui consistently. My version info
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
2006 Jun 16
1
problem with legend on other graphics devices
Hi,
I have a bit of a problem with a legend in png, eps and pdf plots
produced from a custom plotting function. I was writing a little
function to produce some stock plots for a routine analysis conducted in
our lab. I have a wrapper function figures() (see below) that produces
eps, png and pdf versions of the lab output. When I draw the plot on the
X11() device the correct amount of space is
2005 Oct 10
1
Documenting newly created generic versions of non-generic base R functions
Hi,
Following the Writing R Extensions manual, I created a method for the
cor function. As cor is not a generic, I followed the advice of section
6.1 of the same manual and did the following:
cor <- function(x, ...) UseMethod("cor")
cor.default <- stats::cor
cor.symcoca <- function{ some code }
I used package.skeleton to create the basic set-up of my package,
containing the
2002 May 31
2
Matrix-like plot
Dear List,
I have a 47 species * 83 samples matrix containing percentage abundance
data. I have two cluster analyses one of the samples and one of the
species, and have ordered the rows and columns of the species by samples
matrix according to these two cluster analyses. So far so good!
Now what I want to do is create a plot with the species dendrogram at
the top of the plot, the samples
2005 Apr 06
2
make error in R devel
Dear list,
I just hit an error that stopped my make && make check-devel operation
on my linux box (FC3, i686 P4 2GB RAM). Just to note that I've been
building the development branch(?) for some time and this is the first
hint of a problem.
1) updated the src tree using svn update
2) ran ../configure --with-recommended-package=no from my build directory
3) got:
R is now configured
2003 Oct 27
2
problem using do.call and substitute for predict.glm using poly()
Hi
I am having a particular problem with some glm models I am running. I
have been adapting code from Bill Venables 'Programmers niche' in RNews
Vol 2/2 to fit ca. 1000 glm models to a combination of species 0/1 data
(as Y) and related physicochemical data (X), to automate the process of
fitting this many models. I have successfully managed to fit all the
models and have stored the
2003 Feb 28
1
summary.glm() print problem(?) with cor = TRUE
Hi,
I've had a look the bug list and searched though the R documentation, email
lists etc. but didn't see anything on this:
when I do:
summary(species.glm1, correlation = TRUE)
I get a correlation matrix like this:
Correlation of Coefficients:
( p I(H C
pH * 1
I(pH^2) * B 1
Ca . . 1
I(Ca^2) . . B
attr(,"legend")
[1] 0 ` ' 0.3 `.'
2006 Oct 04
2
Status of R 2.4.0 in svn repository and R-Admin manual
Dear list,
I have been using and testing the alpha/betas of R 2.4.0, sources for
which I got from svn.r-project.org/R/branches/R-2-4-branch, and which I
compiled on my Fedora Core 5 machine. No problems there. I have just
updated the source tree today and re-compiled - which also works just
fine. When run, this gives:
R version 2.4.0 Patched (2006-10-03 r39576)
So I assume from that, that I am
2005 Apr 11
2
Sweave and abbreviating output from R
Dear List,
I'm using Sweave to produce a series of class handouts for a course I am
running. The students in previous years have commented about wanting
output within the handouts so they can see what to expect the output to
look like. So Sweave is a godsend for producing this type of handout -
with one exception: Is there a way to suppress some rows of printed
output so as to save space
2005 May 04
1
make hanging during compile of r-patched/R-devel on Fedora Core 3
Hi,
On a new Dell laptop, with a fresh FC3 installation (with latest updates
applied) I am experiencing make hanging consistently after/during
building grDevices. This happens when using the configure flag
--with-lapack (I have the LAPACK rpm distributed with FC3 installed).
The last two lines of output are:
make[5]: Leaving directory
2006 Sep 19
4
How to draw a per mille symbol?
Dear list,
Following advice posted to this list a while back by Prof Ripley [1], I
have been trying to draw a per mille character [2] in an axis label.
This should give the correct character:
plot(1:10, ylab = "\u2030")
but all I get is '"S'. I'm running linux (FC5) and have fonts installed
that have the correct character (viewed in the Gnome character map at
least).