I'm trying to put Greek letters in factor labels on a boxplot. Using the
expression() format works great in axis labels, but seems not to cooperate
when applied to factor labels. More precisely, I'm assigning the labels from
a factor variable using:
var.order <- ordered(var, levels = c("A", "B"),
Suppose you have an aov model x.aov
Then you can use
TukeyHSD(x.aov)
to get all pairs.
Hope this help!
Sincerely,
Erin
-Original Message-
From: José Alberto Monteiro [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 3, 2008 8:45:35 AM CST
To: [EMAIL PROTECTED]
Subject: [R
tom soyer wrote:
> oops, it should be: rms=(sum((x-mean(x))^2)/(length(x)-1))^(1/2)
>
sd(x) does the same thing.
domenico
> On 1/3/08, tom soyer <[EMAIL PROTECTED]> wrote:
>
>> Thanks Jim. Yes it does... but I calculated the root mean square (rms),
>> and couldn't reproduce the result withou
On Jan 4, 2008, at 12:06 AM, Peter Waltman wrote:
>
>> fooStack[[1]] <- fooModifier(fooStack[[1]])
> I thought of this idea as well, and may go with it, if the Gabor's
> environments idea doesn't work
>
>> snip
>>
>> Peter, perhaps it would help if you gave us more context into why
>> you wan
> fooStack[[1]] <- fooModifier(fooStack[[1]])
I thought of this idea as well, and may go with it, if the Gabor's
environments idea doesn't work
> snip
>
> Peter, perhaps it would help if you gave us more context into why you
> wanted this done, and perhaps then someone can suggest a more natur
oops, it should be: rms=(sum((x-mean(x))^2)/(length(x)-1))^(1/2)
On 1/3/08, tom soyer <[EMAIL PROTECTED]> wrote:
>
> Thanks Jim. Yes it does... but I calculated the root mean square (rms),
> and couldn't reproduce the result without multiplying the rms by 2. I don't
> know why...
>
> > x=c(2,4,3,
Thanks Jim. Yes it does... but I calculated the root mean square (rms), and
couldn't reproduce the result without multiplying the rms by 2. I don't know
why...
> x=c(2,4,3,4,5)
> mean(x)
[1] 3.6
> x-mean(x)
[1] -1.6 0.4 -0.6 0.4 1.4
> scale(x)
[,1]
[1,] -1.4032928
[2,] 0.3508232
[3
This seems rather complicated. From ?png note that just using
png("myoutput%03d.png")
will cause each subsequent graphics page to generate a separate PNG file.
(It 'redirects' as asked for, not copies from the screen.)
On Thu, 3 Jan 2008, jim holtman wrote:
> I have used a function like this t
Here is a function that I use since the numeric value is the number of
seconds from 1/1/1970, which is the Unix time base that I am also
using:
unix2POSIXct <- function (time) structure(time, class = c("POSIXt", "POSIXct"))
It just reassigns the proper class.
On Jan 3, 2008 12:01 PM, Thomas Pujo
Does this give you what you want?
> x=c(2,4,3,4,5)
> ?scale
> scale(x,scale=FALSE)
[,1]
[1,] -1.6
[2,] 0.4
[3,] -0.6
[4,] 0.4
[5,] 1.4
attr(,"scaled:center")
[1] 3.6
>
Default is to performance scaling: "If scale is TRUE then scaling is
done by dividing the (centered) columns of x by thei
Never mind. I forgot the scale= parameter.
On 1/3/08, tom soyer <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> The documentation for scale() states:"If center is TRUE then centering is
> done by subtracting the column means (omitting NAs) of x from their
> corresponding columns". But it seems that R is su
Hi,
The documentation for scale() states:"If center is TRUE then centering is
done by subtracting the column means (omitting NAs) of x from their
corresponding columns". But it seems that R is subtracting something else
instead of the column mean:
> x=c(2,4,3,4,5)
> mean(x)
[1] 3.6
> x-mean(x)
[1
I have used a function like this to capture the output on the terminal
to a file:
f.plot <- local({ # this will make PlotNumber 'local' (private)
PlotNumber <- 1 # initialize the plot number (known just to this function)
return(function(){ # returns the 'function' as the result
dev
Dear all,
Every time that I need to generate I plot output as figure I use something like
png("myoutput.png")
plot(rnorm(100)*1.0,col=4)
points(rnorm(100)*0.5,col=2,pch=0)
dev.off()
But now I need to generate a lot of outputs and it could not be done in a for
looping where I can change the name
I am trying to establish an interface as captioned above. I have
downloaded the FAME/R interface provided by on the CRAN website,
however, I continue to experience problems.
Is anyone familiar with this interface and the steps to correctly
implement it?
Thank you.
Bethany
___
Hello R and BUGS users,
I am writing a heirarchical model in R to send to BUGS via R2WinBUGS and
I am finding it difficult to get the model to run. I seem to be having
two problems.
1) I can't seem to send variables classed as factors (Month), is there a
way do this?
2) Checking the Log in Win
On Jan 3, 2008 6:58 PM, Charilaos Skiadas <[EMAIL PROTECTED]> wrote:
>
> On Jan 3, 2008, at 5:08 PM, Bert Gunter wrote:
>
> > Gentlemen:
> >
> > I'm sorry, I don't see the problem. R's is Lisp (or Scheme)-
> > inspired, so you
> > need to think in terms of lists, or equivalently, trees. So what
> >
There is an online appendix to John Fox's book here:
http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-scope.pdf
and there is a background paper in the additional information section
of the proto home page.
Here is a stack implementation using proto. We define
a proto object, stack,
On Jan 3, 2008, at 5:08 PM, Bert Gunter wrote:
> Gentlemen:
>
> I'm sorry, I don't see the problem. R's is Lisp (or Scheme)-
> inspired, so you
> need to think in terms of lists, or equivalently, trees. So what
> you seem to
> want to do is easily navigate down a tree to modify a node. This is
On 1/2/08, John Fox <[EMAIL PROTECTED]> wrote:
> Dear Stefan,
>
> I don't think that your question was answered.
>
> If you invoke the formula method for splom(), then your function works; that
> is, you can use
>
> splom(~as.data.frame(rbind(data, outliers)), . . . .
>
> It looks to me as
Hi Gabor -
Thanks for the 2 suggestions (and to Charilaos Skiadas as well, who also
suggested looking at proto).
I think I'm leaning towards using the new environment idea you
suggested, however, I don't quite get what a promise is (beyond what the
help page says and I didn't really follow it)
You can do it with environments. The first line sets up fooStack with
a list of environments instead of a list of lists and the remaining lines
are the same as in your post squished to one line each to make it
easier to see the entire code at once:
fooStack <- lapply(1:5, new.env)
fooModifier <-
Gentlemen:
I'm sorry, I don't see the problem. R's is Lisp (or Scheme)-inspired, so you
need to think in terms of lists, or equivalently, trees. So what you seem to
want to do is easily navigate down a tree to modify a node. This is fairly
easy to do with list indexing:
## First create a tree wit
You might want to consider using the proto package. Otherwise,
functions that end in <- have the ability to alter their arguments.
Look at the following (admittedly not very natural) construct:
`fooModifier<-` <- function( foo, value ) {
foo$bar <- "bar"
}
fooModifier( fooStack[[ 1 ]] )
specifically, imagine we have:
fooStack <- list()
for ( i in 1:5 )
fooStack[[i]] <- list()
and we have a function:
fooModifier <- function( foo ) {
foo$bar <- "bar"
}
then, if we invoke fooModifier, i.e.:
fooModifier( fooStack[[ 1 ]] )
the
On Thu, 2008-01-03 at 18:05 +0100, Bálint Czúcz wrote:
> One more suggestion: mvpart
> https://stat.ethz.ch/pipermail/r-packages/2004/16.html
IIRC, mvpart assumes numeric multivariate responses, not categorical
ones. You could treat the data numerically I suppose, but you'd have to
be very car
On 1/3/2008 2:52 PM, Manisha Brahmachary wrote:
> Problem#
>
> I am having a problem combining a matrix and elements of a list into one data
> frame.
>
> Data
>
> T
Problem#
I am having a problem combining a matrix and elements of a list into one data
frame.
Data
The matrix is ludwig.results and dim of matrix is 213,8.
The lis
On Wed, 02-Jan-2008 at 10:08PM +0100, Daniel Oberski wrote:
|> Dear all,
|>
|>
|> I am trying to install R on a (Linux Debian) machine where I do not
|> have root access. So far I succeeded in compiling from source and
|> running R.
|>
|> But I would really like to be able to use "make install"
On 1/3/2008 2:20 PM, Richard Saba wrote:
> Is anyone aware of an R procedure similar to STATA's "heckprob" procedure?
> "Heckprob" fits maximum likelihood probit models correcting for sample
> selection bias.
>
> Thanks,
RSiteSearch("Heckman selection", restrict="functions") points to the
micEcon
Is anyone aware of an R procedure similar to STATA's "heckprob" procedure?
"Heckprob" fits maximum likelihood probit models correcting for sample
selection bias.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: [EMAIL PROTECTED]
[[altern
Many thanks, Brian. Quite right! -- traceback() should be mandatory.
I wasn't aware that some data frames cannot be printed in some
representation. I always got something out, even if uninformative.
-- Bert
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Thur
The error is in printing ...
foo <- data.frame(I(z))
works. It is not hard to create a data frame you cannot print, and this
is one. It could be considered a bug in format.AsIs, which calls
toString without removing its class.
Traceback() helps:
14: format.AsIs(x, ...)
13: format(x, ...)
12
> sessionInfo()
R version 2.6.1 Patched (2007-12-03 r43574)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] grDevices datasets st
matrix() does not preserve class attributes, as it merely creates a matrix
of mode the mode of its argument (possibly after some coercion), which is
"numeric" for POSIXct, as you know.
So why not just manually set the class attribute after creation of the
data.frame:
mydf <- data.frame(matrix(my
On Thu, 2008-01-03 at 10:10 -0600, [EMAIL PROTECTED] wrote:
> >From: Max <[EMAIL PROTECTED]>
> >Date: 2008/01/03 Thu AM 09:31:40 CST
> >To: [EMAIL PROTECTED]
> >Subject: Re: [R] Multivariate response methods question
>
> Hi Max: multinom allows ( and probably polr also ) allows a
> categorical re
On Thu, 2008-01-03 at 07:31 -0800, Max wrote:
> Dimitris,
>
> Thankyou for pointing me at those functions. It seems like they're
> limited to only one response variable, unless there's a way of
> inserting multiple responses that I'm unaware of (which could easily be
> true) into the formulas.
Hello List,
I do have R version 2.3 installed in my SUSE linux environment and I am
trying to upgrade it to 2.6. Can any body tell me how to upgrade R 2.3 to R
2.6. I tried to uninstall R from the installed directory using the
make uninstall prefix=/usr/lib/R
command, but got the following err
One more suggestion: mvpart
https://stat.ethz.ch/pipermail/r-packages/2004/16.html
Bálint
On Jan 3, 2008 4:31 PM, Max <[EMAIL PROTECTED]> wrote:
> Dimitris,
>
> Thankyou for pointing me at those functions. It seems like they're
> limited to only one response variable, unless there's a way of
On Thu, 2008-01-03 at 14:47 +, Gavin Simpson wrote:
> On Sun, 2007-12-30 at 20:28 +, baptiste Auguié wrote:
> > Hi,
> Is Constants supposed to be fixed and unchanging? If yes, why hold these
> in a data object? One option might be to have a function Constants() in
> your package, such th
Please see example code below.
I have a vector ("mydata") of length 10. "mydata" can have various formats
(e.g. numeric, text, POSIXct, etc) I use the matrix and data.frame functions
to convert "mydata" to a dataframe ("mydf") of 2 columns and 5 rows.
What is a "good" way to ensure
well, these are *approximate* confidence intervals (i.e., big enough
sample sizes are required for the asympotics to work), check Section
2.4.3 in Pinheiro and Bates (2000), and also the code below
set.seed(56820)
B <- 1
tvals <- numeric(B)
num.wrong <- 0
for (K in 1:B) {
travel <- beta
>From: Max <[EMAIL PROTECTED]>
>Date: 2008/01/03 Thu AM 09:31:40 CST
>To: [EMAIL PROTECTED]
>Subject: Re: [R] Multivariate response methods question
Hi Max: multinom allows ( and probably polr also ) allows a categorical
response that can take on any number of values so I am unsure what you mean
Hi,
I would like to know if there is any function that reformats multiple
lm objects into one only table. Say:
data(swiss)
model1=lm(Fertility ~ Education,data=swiss)
model2=lm(Fertility ~ Education + Examination,data=swiss)
...
modeln=lm(Fertility ~ Education + Examination + (many other
vari
On Thu, 3 Jan 2008, Shubha Vishwanath Karanth wrote:
> Does anybody know to introduce EQUALITY constraints in 'constrOptim'
> function?
>
You can't.
The optimizer in constrOptim requires a starting value in the *interior*
of the feasible region, and equality constraints mean there is no
interi
See the source code of function:
getS3method("friedman.test", "default")
On 03/01/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Dear all,
> I'm using friedman rank test in R. I need to know which P
> value
> is used default and procedure to change the threshold P value.
>
On 1/3/2008 1:06 AM, [EMAIL PROTECTED] wrote:
> Dear all,
> I'm using friedman rank test in R. I need to know which P
> value
> is used default and procedure to change the threshold P value.
It doesn't set any threshold. That's up to you. It just reports the
p-value.
Duncan Mu
Dimitris,
Thankyou for pointing me at those functions. It seems like they're
limited to only one response variable, unless there's a way of
inserting multiple responses that I'm unaware of (which could easily be
true) into the formulas.
Thanks,
-Max
After serious thinking Dimitris Rizopoul
> Sorry if this is too trivial. Is there a way to get confidence intervals
for a
> beta distribution? e.g. Is this wrong for calculating the 2.5% lower CI
for a
> distribution with parameters 13.2 and 691?
>
> qbeta(0.025, 13.2, 691)
This looks fine.
> Also, is there a way to get CI for a diri
Dear all,
I'm using friedman rank test in R. I need to know which P value
is used default and procedure to change the threshold P value.
With regards
jeevitesh
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-h
On Sun, 2007-12-30 at 20:28 +, baptiste Auguié wrote:
> Hi,
>
> Thanks for this tip, I'm always amazed at the number of clever
> functions built-in in R –– just wish i could think of their name
> rather than reinventing the wheel.
>
> However, I'm still stupidly stuck with this basic ques
Does anybody know how to deffine in the test tukeyHSD the pairs of
comparison that you want to get? It is throw the lmat commnad, but I
don't know the correct usage...
Thanks a lot!
José
--
MSc José Alberto F. Monteiro
Botanisches Institut
Universität Basel
السلام عليكم
__
Hello,
I am interested in using nlme to model repeated measurements, but I don't seem
to get good CIs.
With the code below I tried to generate data sets according to the model given
by equations (1.4) and (1.5) on pages 7 and 8 of Pinheiro and Bates 2000 (having
chosen values for beta, sigma.b an
BEP wrote:
> Hello all,
>
> I am working with a very large data set into R, and I have no interest in
> reviving my SAS skills. To do this, I will need to drop unwanted variables
> given the size of the data file. The most common strategy seems to be
> subsetting the data after it is read into R
On Jan 3, 2008 9:00 AM, BEP <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I am working with a very large data set into R, and I have no interest in
> reviving my SAS skills. To do this, I will need to drop unwanted variables
> given the size of the data file. The most common strategy seems to be
>
Hello all,
I am working with a very large data set into R, and I have no interest in
reviving my SAS skills. To do this, I will need to drop unwanted variables
given the size of the data file. The most common strategy seems to be
subsetting the data after it is read into R. Unfortunately, given
fit1 <- glm(factor(x1)~factor(Round)+x2,family=binomial(link="probit"))
fit2 <- gam(factor(x1)~factor(Round)+x2,family=binomial(link="probit"))
all.equal(fitted(fit1), fitted(fit2))
[1] TRUE
so the fits to the data are the same: your error was in over-interpreting
the parameters in the presence
Dear R users,
Sorry if this is too trivial. Is there a way to get confidence intervals for a
beta distribution? e.g. Is this wrong for calculating the 2.5% lower CI for a
distribution with parameters 13.2 and 691?
qbeta(0.025, 13.2, 691)
Also, is there a way to get CI for a dirichlet distributi
For what it's worth, I have found one way to achieve what I want,
which is to use "expect", which is installed on many *nix systems. In
case this is useful to anyone else I'm posting a quick example...
$ expect -f test.expect
[1] 7
1: yes
[1] "Answer was yes"
$ cat test.expect
log_user 0
spawn R -
Hi all,
I don't know how to choose the formula to use when plotting an svm model, I
think I'm using the wrong one and so that is why I'm having trouble. I should
be very grateful if someone could help me on this..
> dados<-read.table("b.txt",sep="",nrows=3)
> model<-svm(x=dados[,-1],y=d
Does anybody know to introduce EQUALITY constraints in 'constrOptim'
function?
BR, Shubha
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLE
Hi
[EMAIL PROTECTED] napsal dne 03.01.2008 11:53:38:
> Hi all,
>
> Could someone please explain how can i efficientily query a data frame
> with several factors, as shown below:
>
>
-
> Data
Hi all,
Could someone please explain how can i efficientily query a data frame
with several factors, as shown below:
-
Data frame: pt.knn
---
Prof Brian Ripley wrote:
> On Thu, 3 Jan 2008, Philipp Fechteler wrote:
>
>> Hello Mr Ripley
>>
>> Prof Brian Ripley wrote:
>>> So you have to write a script that will not terminate until you
>>> 'press a button or something like this'. That's easy to do, but as
>>> you haven't told us your OS.
Hilmar Berger wrote:
> Peter Dalgaard schrieb:
>
>> Hilmar Berger wrote:
>>
>>> Sorry,
>>> I obviously did not state clearly what the problem is (thanks Daniel):
>>>
>>> 1. minor problem: cor() does return different types of variables for
>>> methods "kendall" and pearson (matrix vs. scalar
On Thu, 3 Jan 2008, Philipp Fechteler wrote:
> Hello Mr Ripley
>
> Prof Brian Ripley wrote:
>> So you have to write a script that will not terminate until you 'press a
>> button or something like this'. That's easy to do, but as you haven't told
>> us your OS. E.g. on Windows, call winDialogSt
Hello Mr Ripley
Prof Brian Ripley wrote:
> So you have to write a script that will not terminate until you 'press a
> button or something like this'. That's easy to do, but as you haven't
> told us your OS. E.g. on Windows, call winDialogString at the end.
>
Thank you for helping. I am runni
Hi all,
thanks for your help, I just found out that the code for cor() in the
latest development snapshot of R (02/Jan/2008) does fix my problem.
Regards,
Hilmar
Hilmar Berger schrieb:
> Sorry,
>
> I obviously did not state clearly what the problem is (thanks Daniel):
>
> 1. minor problem:
Thanks much for your response. My apologies for not putting sample code in
the first place. Here it comes:
Round=rep(1:10,each=10)
x1=rbinom(100,1,0.3)
x2=rep(rnorm(10,0,1),each=10)
summary(glm(factor(x1)~factor(Round)+x2,family=binomial(link="probit")))
library(mgcv)
summary(gam(factor(x1)~fact
you can have a look at the following functions:
help("polr", package = "MASS")
help("lrm", package = "Design")
help("multinom", package = "nnet")
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Hi Everyone,
I have some data that predicts both a nominal and ordinal response
variable. I was wondering what packages in R would help me analyze the
data?
I was also curious if anyone could recomend me some textbooks that
would help with the analysis of such data? I have the 5th edition of
Peter Dalgaard schrieb:
> Hilmar Berger wrote:
>> Sorry,
>> I obviously did not state clearly what the problem is (thanks Daniel):
>>
>> 1. minor problem: cor() does return different types of variables for
>> methods "kendall" and pearson (matrix vs. scalar) when
>> pairwise.complete.obs is sele
On Thu, 3 Jan 2008, hodgess wrote:
>
>Hi R people:
>
> On page 235 of the Blue Book (Becker, Chambers, and Wilks), there is a
> "compose2" function.
>
> compose2 <- function(f,g) {
> gg <- substitute(g1(x))
> print(gg)
> gg[[1]] <- g
> ff <- substitute(f1(y))
> print(ff)
> ff[[1]] <- f
> ff[[
That is what I wanted. Thank you very much Chuck.
_Fede_
Chuck Cleland wrote:
>
> _Fede_ wrote:
>> Sorry for the previous message. I have been reading the help page about
>> boot
>> library and I have already understood what the arguments made reference
>> (original data and vector of indices
Hi R people:
On page 235 of the Blue Book (Becker, Chambers, and Wilks), there is a
"compose2" function.
compose2 <- function(f,g) {
gg <- substitute(g1(x))
print(gg)
gg[[1]] <- g
ff <- substitute(f1(y))
print(ff)
ff[[1]] <- f
ff[[2]] <- gg
print(ff)
fun <- function(x){ NULL
On Jan 3, 2008 2:21 AM, Dieter Menne <[EMAIL PROTECTED]> wrote:
> Gabor Grothendieck gmail.com> writes:
>
> > How are you starting up the command line? If I position myself to the right
> > side of the Windows Explorer window in Vista and press Shift-RightClick and
> > then choose Open Command W
76 matches
Mail list logo