Dear list,
I want to combine several plots in one graph.
I did this: plot(a1); plot(a2, add=TRUE); ...plot(a5, add=TRUE)
The problem is the more plot we put, the more complex the graph.
Is there any way to label each line; or other way just to make sure I know
which one which?
Thank you for the h
Here's my take on it, don't know if you cared at all about optimizing
the first couple of lines:
data <- data.frame(x=rep(c("A","B"),5), y=c(NA,NA,rnorm(8)))
means <- with(data,ave(y, as.character(x), FUN=function(x) mean(x,
na.rm=TRUE)))
data$y <- ifelse(is.na(data$y),means,data$y)
I tend to
Dear Sir
I am using R 2.6.0. In R console grDevices are not giving results like
"png", "postcript", xlim, etc. I think they are not activated?
I request you to please provide guidance in this regard.
Regards
--
AMINA SHAHZADI
Department of Statistics
GC University Lahore, Pakistan.
If you are referring to rollmean in the zoo package then na.pad = TRUE
will cause the output to be the same length as the input:
> library(zoo)
> rollmean(zoo(1:10), 3, na.pad = TRUE)
1 2 3 4 5 6 7 8 9 10
NA 2 3 4 5 6 7 8 9 NA
> rollmean(zoo(matrix(1:10, 5)), 3, na.pad = TRUE)
1
Here's one way.
new.matrix <- my.matrix
new.matrix[] <- with(my.df, my.value[match(my.matrix, my.id)])
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Milton Cezar Ribeiro
Sent: Saturday, 24 November 2007 7:14 AM
To: R-help
Subject: [R] updating matrix f
Hi Clara,
I suspect your error is happening because your input data
is short (9 observations). In the help for ar() for
argument "order.max" it states
order.maxMaximum order (or order) of model to fit. Defaults to
10*log10(N) where N is the number of observations except for method="mle
Hi,
i have some data, that has 1-5 % noise.
I want to smooth this data without loosing rows.
rollmean() would be great, but it returns a vector of different size as the
initial vector.
--
kind regards,
Jonas Stein <[EMAIL PROTECTED]>
__
R-help@r-pr
> However, I don't know what exactly glht does, and the help file is
> extremely terse. It offers the following options (in contrMat()):
>
> contrMat(n, type=c("Dunnett", "Tukey", "Sequen", "AVE",
> "Changepoint", "Williams", "Marcus",
> "McDermo
> This is a strange argument. A good package will get a good review, which
> may help it to become better. A review of a weak package can point out how
> it can be fixed. Reviews will not become stale, just because packages are
> frequently updated by their authors (like some that could be menti
R as a whole could benefit from systematic attention.
There may be scope for several special issues of JSS.
- R overview and philosophy
- R penetration and influence, in the statistics community,
in machine learning, and in a variety of application areas.
- R as a vehicle for fostering commun
> -Original Message-
> From: Vincent Goulet [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 23, 2007 7:47 AM
> To: Daniel Nordlund
> Cc: [EMAIL PROTECTED]
> Subject: Re: [R] problem updating packages on Ubuntu 7.10
>
> Le jeu. 22 nov. à 14:19, Daniel Nordlund a écrit :
>
> > I am runni
Hi Jim,
Yes indeed, after several more attempts
at executing the example, I did also
eventually trip the error (on the
11th execution of res.ar<-ar(x,aic=TRUE,demean=F)):
> res.ar$x.mean
[1] 0
> res.ar$resid
Qtr1 Qtr2 Qtr3 Qtr4
1978 -0.2052083 -0
Thank you for your response. I think you have misunderstood what I'm
asking, though.
On 2007-11-23, Emmanuel Charpentier <[EMAIL PROTECTED]> wrote:
>
> - Tukey HSD will enable you to test the p(p-1)/2 pair differences one
> can create with p groups ;
> - Dunnett's procedure is made to compare (p-
Try this (not a lot of error checking -- assumes values 1-5 are in the
matrix and in my.id):
new.matrix <- my.df$my.value[match(my.matrix, my.df$my.id)]
dim(new.matrix) <- dim(my.matrix)
On Nov 23, 2007 4:13 PM, Milton Cezar Ribeiro <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I have a matrix which
When I tried it on my Windows system, I executed the script at least
4 times in succession before I got the error:
> # time series
> x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-
+ 1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1980,3))
>
> # ar funct
Dear all, Is there a best way to do the following task? x =
rep(c("A","B"),5)y = rnorm(10)data =
data.frame(x,y)data$y[1:2] = c(NA,NA)means =
ave(data$y,as.character(data$x),FUN=function(x)mean(x,na.rm=T))aux =
which(is.na(data$y))d
Dear all,
I have a matrix which values varying from 1 to 5.
I also have a table with a column that match with matrix values (=my.id).
my.matrix<-matrix(sample(1:5,100,replace=T),nc=10)
image(my.matrix)
my.df<-data.frame(cbind(my.id=1:5,my.value=c(0.1,0.3,0.2,0.9,1)))
my.df
How can I create a ne
Hi Clara,
Your example works fine on my Apple Mac running
R 2.6.0.
You should include the output of
sessionInfo()
so others will know what platorm you are working on.
> # time series
> x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-
+ 1.7783313,0.2728676,-0.3273164),sta
On 23 Nov 2007, at 4:51 pm, hadley wickham wrote:
> There are two common types of review. When reviewing a paper, you are
> helping the author to make a better paper (and it's initiated by the
> author). When reviewing a book, you are providing advise on whether
> someone should make an expensiv
you could use this instead of the last two statements; don't know if
it makes any simpler since it is just combining into one statement
what you had in two:
data$y[is.na(data$y)] <- means[is.na(data$y)]
On Nov 23, 2007 1:49 PM, lamack lamack <[EMAIL PROTECTED]> wrote:
>
>
>
> Dear all, there is
On 11/23/07, thegeologician <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
>
> I'm digging into ggplot for some while now, I must say it's great! But - as
> some others have posted before, and hadley knows very well himself - the
> documentation is lacking some bits...
>
> So I have to pose that quest
Tyler Smith a écrit :
> Hi,
>
> I'm trying to make sense of the options for multiple comparisons
> options in R. I've found the following options:
[ Snip ... ]
> As I understand it, there is no universal consensus as to which test
> is best.
There is no such thing. Each of the procedures is aim
Thanks to all for your help.
Only to complete this:
The NA´s in my case mean that I have no information for this
character in this species. These are not ecological data, so I have
to deal somehow with the NA´s without replacing by zero.
I think Thibauts help is very useful.
Thanks a lot
B
Antony Unwin <[EMAIL PROTECTED]> and Johannes
Huesing <[EMAIL PROTECTED]> discussed ways to assist
navigation of the universe of R packages.
AU:
>>> ...R is a language and the suggestions so far seem to
>>> me like dictionary suggestions, whereas maybe what John
>>> is looking for is something
The 'factor.model.stat' function (available in the public
domain area of http://www.burns-stat.com) fits a principal
components factor model to data that can have NAs.
You might be able to copy what it does for your purposes.
It does depend on there being some variables (columns)
that have no missi
Dear all, there is a best way to do the following task?
x = rep(c("A","B"),5)
y = rnorm(10)
data = data.frame(x,y)
data$y[1:2] = c(NA,NA)
means = ave(data$y,as.character(data$x),FUN=function(x)mean(x,na.rm=T))
aux = which(is.na(data$y)
Hi everyone!
I'm digging into ggplot for some while now, I must say it's great! But - as
some others have posted before, and hadley knows very well himself - the
documentation is lacking some bits...
So I have to pose that question directly:
I'd like to produce a series of maps with different d
You can look at the components of the output using str and pick out
what you want
using $ and attr.
idx <- 1:2
z <- lm(as.matrix(iris[idx]) ~., iris[-idx])
str(z)
str(summary(z))
On Nov 23, 2007 1:10 PM, Morgan Hough <[EMAIL PROTECTED]> wrote:
> Hi Gabor,
>
> Thanks for your reply. I have it work
Hi Gabor,
Thanks for your reply. I have it working now. A couple of follow-ups if
I may.
I have a shell script parsing the output to find the brain areas where
there is a significant effect of diagnosis but its a bit of a hack. I
was wondering whether there are R specific tools for parsing/sum
Hi, can anyone give me some advice on dealing with binary data in R efficiently?
Are there any packages with fast binary vector datatypes &/or algorithms (e.g.
Hamming distance, set covering)?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/ma
Tyler Smith mail.mcgill.ca> writes:
> I'm trying to figure out how anova works in R by translating the
> examples in Sokal And Rohlf's (1995 3rd edition) Biometry. I've hit a
> snag with planned comparisons, their box 9.4 and section 9.6. It's a
> basic anova design:
>
how to do contrast..
Dear all,
(Mac OS X 10.4.11, R 2.6.0)
I have a quantitative dataset with a lot of Na´s in it. So many, that
it is not possible to delete all rows with NA´s and also not
possible, to delete all variables with NA´s.
Is there a function for a principal component analysis, that can deal
with so
Hi, All:
Is there a simple way to detect complex conjugates in the roots
returned by 'polyroot'? The obvious comparison of each root with the
complex conjugate of the next sometimes produces roundoff error, and I
don't know how to bound its magnitude:
(tst <- polyroot(c(1, -.6, .4)))
I am trying to extract coefficients from lars fit and can't find how to get
intercept. E.g.
y = rnorm(10)
x = matrix(runif(50),nrow=10)
X = data.frame(y,x)
fit1 = lars(as.matrix(X[,2:6]),as.matrix(X[,1]))
fit2 = lm(y~.,data=X)
Then, if I do:
> predict(fit1,s=1,mode='fraction',type='coefficients')
Hi,
I'm trying to make sense of the options for multiple comparisons
options in R. I've found the following options:
pairwise.t.test, which provides standard t-tests, with options for
choosing an appropriate correction for multiple comparisons
TukeyHSD, which provides the usual Tukey test
glht(
I am trying to figure out if it is possible to run winBUGS from within
R, using R2winBUGS, without having winBUGS spawn any windows (basically
- 'true' batch - no GUI actions at all). The reason being I have a
machine which I (and several others) ssh/telnet into, and would like to
run winBUGS w
On 2007-11-22, Peter Alspach <[EMAIL PROTECTED]> wrote:
> Tyler
>
> For balanced data like this you might find aov() gives an output which
> is more comparable to Sokal and Rohlf (which I don't have):
>
>> trtCont <- C(sugars$treatment, matrix(c(-4,1,1,1,1, 0,-1,3,-1,-1), 5,
> 2))
>> sugarsAov <-
Birgit Lemcke wrote:
>Dear all,
>(Mac OS X 10.4.11, R 2.6.0)
>I have a quantitative dataset with a lot of Na´s in it. So many, that
>it is not possible to delete all rows with NA´s and also not
>possible, to delete all variables with NA´s.
>Is there a function for a principal component analysi
Dear Birgit,
You need to think about why you have that many NA's. In case of vegetation
data, it is very common to have only a few species present in a site. So how
would you record the abundance of a species that is absent? NA or 0 (zero)? One
could argument that it needs to be NA because you
Dear R helpers,
I have a data frame
> summary(emPat)
pairE subjpattern
far-near : 18 sub1 : 37 urb:123
long-short : 18 sub2 : 37 bpb: 72
supported-unsupported: 18 sub3 : 37 prp: 67
large-small
On 11/23/07, hadley wickham <[EMAIL PROTECTED]> wrote:
> > Above all there are lots of packages. As the software editor of the
> > Journal of Statistical Software I suggested we should review R
> > packages. No one has shown any enthusiasm for this suggestion, but I
> > think it would help. Any
> Above all there are lots of packages. As the software editor of the
> Journal of Statistical Software I suggested we should review R
> packages. No one has shown any enthusiasm for this suggestion, but I
> think it would help. Any volunteers?
There are two common types of review. When review
Le jeu. 22 nov. à 14:19, Daniel Nordlund a écrit :
> I am running Ubuntu 7.10 and R-2.6.0, and I am having trouble
> updating packages. There appears to be a problem involving
> gfortran. For example, here is the output of an attempt to update
> the Hmisc package.
>
> * Installing *source*
Dears Sirs
During my computational work I encountered unexpected behavior when calling
"ar" function, namely
# time series
x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,-
1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1980,3))
# ar function
res.ar<-ar(x
Perhaps something like this:
> idx <- 1:2
> lm(as.matrix(iris[idx]) ~., iris[-idx])
Call:
lm(formula = as.matrix(iris[idx]) ~ ., data = iris[-idx])
Coefficients:
Sepal.Length Sepal.Width
(Intercept) 3.682982 3.048497
Petal.Length0.905946 0.154676
Pet
Hi there,
I am analyzing a table of brain volume measures where each brain area
(183 of them) is a column with a label and volume values. I have another
table of explanatory variables (age, gender, diagnosis and
IntraCranialVol) that I have been using to model the brain volume
differences. I h
Martin Maechler wrote:
>> "JH" == Johannes Huesing <[EMAIL PROTECTED]>
>> on Thu, 22 Nov 2007 22:14:57 +0100 writes:
>
> JH> Antony Unwin <[EMAIL PROTECTED]> [Thu, Nov 22,
> JH> 2007 at 12:43:07PM CET]:
> >> There have been several constructive responses to John
> >> S
I'm coming late to this thread, so I don't know if anyone mentioned
RSiteSearch. See
http://finzi.psych.upenn.edu/R/library/utils/html/RSiteSearch.html
You can also do this directly through a browser (which is how I
usually do it).
In the RSiteSearch() function use restrict="functions". In the w
> "JH" == Johannes Huesing <[EMAIL PROTECTED]>
> on Thu, 22 Nov 2007 22:14:57 +0100 writes:
JH> Antony Unwin <[EMAIL PROTECTED]> [Thu, Nov 22,
JH> 2007 at 12:43:07PM CET]:
>> There have been several constructive responses to John
>> Sorkin's comment, but none of them ar
I found the file tkttest.r in the directory tcltk/demo.
>From this I hope I will be able to do what I want to.
Again thank you for your help,
Ptit Bleu.
--
View this message in context:
http://www.nabble.com/Friendly-way-to--link-R---MySQL-and-non-%28R-and-Mysql%29-users---tf4844081.html#a13911
It's me again (the last message for today - promised).
The following script can be very helpful to me (from
http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/editboxes.html) but I'
like to enter several parameters and have a single 'ok' box to validate all
the entered paramaters.
Anyone can h
On Nov 22, 2007 4:14 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> The SystemRequirements field on the DESCRIPTION file is used
> to document the system requirements. For example, the DESCRIPTION
> file for Ryacas (which requires yacas) is shown below.
>
> Package: Ryacas
> Version: 0.2-8
>
Within the base package collection, see
?colorRamp and ?colorRampPalette
Then
or.to.blue<-colorRampPalette(c("orange","green","blue")) #green
included to avoid muddy blues
plot(df$X, df$Y,type="n")
text(df$X, df$Y, labels=df$Z,
col=or.to.blue(length(df$Z))[rank(df$Z)])
You don't need to order by
I don't run into problems doing this:
x=rnorm(300)
z=rnorm(300)
for (i in 1:300){
p[i]<-exp(-0.834+0.002*x[i]+0.023*z[i])/(1+exp(-0.834+0.002*x[i]+0.023
+z[i])); T[i]<-rbinom(1,1,p[i])
}
hth, Ingmar
On 23 Nov 2007, at 10:25, sigalit mangut-leiba wrote:
> Hello,
> I have a loop with probabilit
Hi Peter,
In fact, just the beginning of the script is interesting to me.
I'm just looking for a simple example :
a single box with 3 entries and 3 labels before.
Something like the example below but with a label before each entry.
I know it is obvious but I don't manage to combine all the examp
Hello,
I have a loop with probability computed from a logistic model like this:
for (i in 1:300){
p[i]<-exp(-0.834+0.002*x[i]+0.023*z[i])/(1+exp(-0.834+0.002*x[i]+0.023
+z[i]))
x and z generated from normal distribution.
I get 300 different probabilities And I want to generate variables from
bern
Ptit_Bleu wrote:
> Dear Gabor,
>
> Thanks for the links.
> I found a a tcl script (see below ; from http://wiki.tcl.tk/15977) which
> could be a good starting point but I'm not able to translate it into R.
> Could you help me ?
> In particularly, what is the command corresponding to
> append_float_
Juan Pablo Fededa wrote:
> Dear Contributors:
>
> I have the next matrix:
>
> "X" "Y" "Z"
>
> 1 2 526
> 2 5 723
> 310 110
> 4 7 1110
> 5 9 34
> 6 8 778
> 7 1 614
> 8 4 876
> 9 6 249
> 10 3 14
>
> I want
Dear Gabor,
Thanks for the links.
I found a a tcl script (see below ; from http://wiki.tcl.tk/15977) which
could be a good starting point but I'm not able to translate it into R.
Could you help me ?
In particularly, what is the command corresponding to
append_float_dialog_item ?
I looked in ?tclt
Johannes Hüsing wrote
> > Above all there are lots of packages. As the software editor of the
> > Journal of Statistical Software I suggested we should review R
> > packages.
>
> You mean: prior to submission?
No.
> > No one has shown any enthusiasm for this suggestion, but I
> > think it would
Dear All,
Is there any bootstrap function in nlme for a non linear mixed model. Either
a non-parametric or parametric one.
Thanks
Bernard
-
[[alternative HTML version deleted]]
_
Thompson, David (MNR ontario.ca> writes:
> Thank you Jim Holtman and Mark Leeds for your help.
>
> Original question:
> >How do I do the following more concisely?
> > Bout[is.na(Bout$bd.n), 'bd.n'] <- 0
> > Bout[is.na(Bout$ht.n), 'ht.n'] <- 0
> > Bout[is.na(Bout$dbh.n), 'dbh.n'] <- 0
62 matches
Mail list logo