That type of error often means a data problem, for example
dividing by standard deviation zero, or something similar.
Please look at your data values. Do you have enough items at
each level of x that standard deviations can be calculated?
__
R-help@r-p
Emacs normally recognizes line endings and opens the file correctly.
Therefore the
first place to look is in the file itself. When some of the lines have ^M
and others do
not, then emacs assumes you have LF-only line endings and displays the ^M
character.
The preventive action is to correct the o
Look at Rcmdr as the base for your additional menu functions.
I am using it for my introductory courses and have added my own menu items.
>From CRAN, download and install Rcmdr and read it's documentation.
Also from CRAN you can download and install my addin library RcmdrPlugin.HH
The latter will s
Correction to my thinko
sapply(ls(), function(x) class(get(x)))
__
R-help@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
sapply(ls(), class)
__
R-help@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.
Ok, I'll write something and try it out.
Rich
-Original Message-
From: Duncan Murdoch [mailto:[EMAIL PROTECTED]
> source() is pure R code, so if you want a function that behaves
> differently, you can do it fairly easily yourself.
__
R-help@r
surrounding them with blank
lines and using C-c C-c.
Rich
-Original Message-
From: Duncan Murdoch [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 09, 2008 10:52 PM
To: Richard M. Heiberger
Cc: r-help@r-project.org
Subject: Re: [R] source(echo=TRUE) bug (was: source() behavior I don't
under
Thanks Duncan,
While there, can you give a new optional argument that
will permit the echo of blanks and comments?
Rich
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-proj
temp.ttt <- "ttt <- 1\nttt"
conn.ttt <- textConnection(temp.ttt)
source(conn.ttt, echo=TRUE) ## name of variable is echoed
close(conn.ttt)
cat(file="c:/temp/temp.R", temp.ttt) ## name of variable not echoed
source("c:/temp/temp.R", echo=TRUE)
temp.abc <- "abc <- 1\nabc"
conn.abc <- textConnecti
A more primitive method is about 5 times faster than Gabor's.
L <- list(
a = c("1", "2", "3"),
b = c("1"),
d = c("2", "4")
)
system.time(
for (i in 1:100)
{t1 <- unlist(L)
names(t1) <- rep(names(L), lapply(L, length))
tapply(names(t1), t1, c)
}
)
system.time(
The answer in emacs is always "Yes".
Type _ twice, and it will become an underscore. See
C-h k _
For the full help page.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jeffrey J. Hallman
Is there a way to turn this off? I sometimes have to use variabl
> a <- 1:10*4
> ceiling(a/10)*10
[1] 10 10 20 20 20 30 30 40 40 40
>
-Original Message-
Lauri Nikkinen
Is there a function for ceiling to the nearest ten?
a <- 1:10*4
a
[1] 4 8 12 16 20 24 28 32 36 40
The resulting vector should look like this ("ceiling to the nearest ten")
[1] 10 10
Most R users believe that there is a clear distinction between " <- " and
"=".
Gabor's example is a wonderful illustration of that distinction.
Most users recommend " <- " for assignment for greater clarity and
readability.
The important characteristic for readability is the space on both sides of
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of John Kane
Sent: Sunday, January 13, 2008 03:56 PM
## Not run:
latex(x) # creates x.tex in working directory
w <- latex(x, file='/tmp/my.tex')
-
I think there
predict.lm keeps row names when working from several rows in
newdata, but always removes rowname from a single row.
The rownames are removed by the line in predict.lm
predictor <- drop(X[, piv, drop = FALSE] %*% beta[piv])
What is the reason for that decision? I usually want to
retain the row
John,
It's worse than a semi-colon problem. It is an error in a self-referential
statement 'a <- a+5'. Type those lines as three separate lines in the Rcmdr
Script Window
and you still get the wrong answer. This is from 1.3-9.
> a<-2
> a<-a+5
> a
[1] 12
Rich
-Original Message-
fortune("help") ## or any quoted string
gives a warning
Warning message:
In grep(which, fort, useBytes = TRUE) :
argument 'useBytes = TRUE' will be ignored
in version.string R version 2.6.1 (2007-11-26)
__
R-help@r-project.org mailing list
https://s
The easiest way would be to use the HH package, which you can get from CRAN.
Marc's example is limited to integers on the X axis. Using positioned(),
which is
an extension to ordered(), allows arbitrary values. Building on that
example
require(HH)
CV <- rnorm(100)
FV <- sample(c(-1.4, 3.2, 5),
Since your target is a spreadsheet on Windows, consider writing
directly to the spreadsheet. Use either the package xlsReadWrite
or the RExcel interface which allows you to embed R functions inside
Excel cells. Look at the main RExcel/rcom site
http://sunsite.univie.ac.at/rcom/
and consider joini
Since your target is a spreadsheet on Windows, it would make sense to write
directly to the spreadsheet. You can use either the xlsReadWrite package,
Description: Read and write Excelfiles natively (v97-2003/BIFF8)
or RExcel, which allows you to imbed R functions inside Excel cells.
Look at the
You are looking for RExcel, which does exactly that. Full documentation
and examples are included in the package.
http://sunsite.univie.ac.at/rcom/download/devel/
If you don't have R-2.6.1 yet, get the whole R system with
the RExcel installed
RAndFriendsSetup2061V1.82.exe
Otherwise, just get
I think this does what you are asking for. It should be
relatively easy to write a method
latex.ftable()
based on this. One or two row.vars and one or two col.vars
should be straightforward (with n.rgroup and n.cgroup used
for the second row and column).
Rich
start here
df = data.frame(d
Yes, with the HH package.
require(HH)
dotplot(sample(0:9, 50, replace=TRUE), panel=panel.dotplot.tb)
dotplot(rep(1:5,10) ~ sample(0:9, 50, replace=TRUE), panel=panel.dotplot.tb)
dotplot(rep(1:5,10) ~ sample(0:9, 50, replace=TRUE) | rep(c(1,1,1,2,2),10),
panel=panel.dotplot.tb)
dotplot(~ sample(0:9
Your model is fully saturated. It specifies terms that use
up all degrees of freedom. There are no degrees of freedom left
over for a Residual term and therefore there is no denominator for
the tests.
When you drop one term, then those degrees of freedom are left over,
that is they form the Res
The only obvious typo is the misspelling of "Tukey". Uppercase is
necessary.
But that is not the cause of the current error. I can't duplicate the
problem
from your description. Look at the data.frame data_mcp. If that doesn't
give
you the hint, then you will need to send the data to the list,
## I would use latex() for this example.
library(Hmisc)
team.dat <- '
GK Paul Robinson
LB Lucus Radebe
DC Michael Duberry
DC Dominic Matteo
RB Didier Domi
MC David Natty
MC Eirik Bakke
MC Jody Morris
FW Jamie Mcmaster
ST Alan Smith
ST Mark Viduka
'
team <- read.table(textConnection(team.dat),
The multicomp package was replaced about a year ago with the multcomp
package.
Your sig.data can be plotted with the multcomp package with the following
code.
require(multcomp)
tmp <- list(confint=sig.data)
attr(tmp, "type") <- "none"
old.oma <- par(oma=c(0,1,0,0))
multcomp:::plot.confint.glht(tm
The best way to read or write Excel files is with the RExcel package. The
development package available from
http://sunsite.univie.ac.at/rcom/download/devel/RExcel.installer_1.80-14.zip
reads both Excel 2003 and Excel 2007 files. In this development release,
the installer is structured as an ord
rep(
sum(sample(1:6,100,replace=T)),
times=10)
Read carefully what you wrote. You asked R to sum a single sample, then
make
ten copies of the sum.
You need to take ten samples, then sum each. apply() would be helpful.
-Original Message-
I'm trying to get R to simulate the sum
What are your criteria for friendliness? What features are you missing in
emacs
that you wish were there? Are these ESS features or LaTeX related features?
Rich
-Original Message-
want something like Emacs (of course including auctex and ess), but
not Emacs. Something like Tinn-R [htt
tmp <- c(7,7,7,7, -4,-4,-4,-4,-4,-4,-4)
tmpf <- factor(letters[1:11])
tmpf
contrasts(tmpf)
contrasts(tmpf) <- tmp
contrasts(tmpf)
zapsmall(crossprod(contrasts(tmpf)))
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
Download the multcomp package for multiple comparisons.
You might also want to use the MMC functions in the HH package
to display the contrasts.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
801 - 832 of 832 matches
Mail list logo