= e))
# z1 z2 z3
# 100 10 -1
Peter Ehlers
On 2012-05-22 09:43, Robbie Edwards wrote:
I don't think I can.
For the sample data
d- data.frame(x=c(1, 4, 9, 12), s=c(109, 1200, 5325, 8216))
when x = 4, s = 1200. However, that s4 is sum of y1 + y2 + y3 + y4.
Wouldn't I have to know the y
) was immediate. Do I need to go down another route to get
to the source of extractAIC?
With thanks for any help you may offer,
Julia
You probably want extractAIC.lm (see what methods are available
with methods(extractAIC)). Get the code with
stats:::extractAIC.lm
Peter Ehlers
,
but I find R very difficult to use, even after looking up its built-in help.
Just a small comment, since you're interested in correct syntax:
you apparently consider A*B to represent the (A,B)
interaction term; in R, it's A:B and this *is* clearly documented
in the help pages.
Peter Ehlers
I
of Cfl~Pw and Cfl~Tsoil says to me that you
have far too much variability to fit your model.
You might find this plot instructive:
library(rgl)
plot3d(Pw, Tsoil, Cfl, col=1+(Pw5), size=5)
Peter Ehlers
__
R-help@r-project.org mailing list
https
(2,3,18),
x = gl(3,1,18),
y = sample(11:15, 18, replace=TRUE))
library(plyr)
ddply(d, .(subject, session), transform,
z = ifelse(y == max(y), 1, 0))
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
to
accommodate tall bars.
Peter Ehlers
On 2012-05-14 04:32, Gerrit Eichner wrote:
Carol,
it is not clear to me which function histogram() you use (package lattice,
package histogram ...?), but -- if it is not a lattice function -- a quick
hack _might_ be to use
par( cex = 2)
or whatever magnification
for the unit.
As for the 'cex=1:2' specification, only the first value is used.
Cheers,
Peter Ehlers
On 2012-05-12 14:05, Bert Gunter wrote:
This is a followup to a recent post on using atop() to obtain
multiline expressions.
My reading of the plotmath docs makes it clear that issuing (in base
graphics
Ben,
I think that your original for-loop would work if you just
replaced the 'i' in the lines() call with 'Data2[,i]':
for (i in 2:length(Data2)) {
lines(MONTH, Data2[, i], type=o, pch=22, lty=2, col=blue)
}
Peter Ehlers
On 2012-05-03 07:04, Ben Neal wrote:
Jim, thanks
?
Your code is not reproducible. (And do use TRUE instead of T; sooner
or later it *will* bite you.)
I think that you might be able to accomplish what I think you
want by setting the argument axis.args, e.g.
plot(x, stacked=TRUE,
axis.args = list(y = list(c(apple, banana,
Peter
(Cbind(x,xlower,xupper) ~ mo,data=foo)
Just set the 'scales=' argument, e.g.
xYplot(Cbind(x,xlower,xupper) ~ mo,data=foo,
scales = list(at = 1:12, labels = month.abb))
Peter Ehlers
# example 2: doesn't work
xYplot(Cbind(x,xlower,xupper) ~ mo.fac,data=foo
?
Peter Ehlers
__
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.
of str(ad04) than
the above useless summary.
Peter Ehlers
aout04- amelia(ad04,noms=c(race,south,gender,demrep), m=5)
Error in if (sum(non.vary == 0)) { :
argument is not interpretable as logical
In addition: Warning message:
In FUN(X[[34L]], ...) : NAs introduced by coercion
On Wed, Apr 18, 2012
, :
variable lengths differ (found for 'litho')
Michael,
Unless I'm missing something, don't you just have to drop the quotes
in your cbind()?
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
(
xlab.key.padding = 5 )),
key = list( etc
Peter Ehlers
Here is the sample code I have
==
xyplot
(1~1,key=list(space='bottom',columns=2,text=list(c('a','b','c','d')),
lines
=list(lwd=2,pch=c(1,1,2,2),cex=1.2,col=c(1,2,3,4),type=c('p
that were wanted for
the final report. It wasn't hard to figure out that lattice.heights
was a list of height parameters and that things like xlab.key.padding
affected the spacing between the xlab and the key. That's the beauty
of R's interactive nature - it's easy to experiment.
Peter Ehlers
Jun
)
Peter Ehlers
Thanks
E.
[[alternative HTML version deleted]]
__
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
On 2012-04-15 09:31, David Winsemius wrote:
On Apr 15, 2012, at 11:54 AM, Peter Ehlers wrote:
On 2012-04-15 03:19, Eiko Fried wrote:
Probably a stupidly simple question, but I wouldn't know how to
google it:
xyplot(neuro ~ time | UserID, data=data_sub)
creates a proper plot.
However, if I
() or for stepAIC() in pkg MASS tells you that there's a
scope= argument which should do what you want.
Peter Ehlers
Thanks a lot,
Hien
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
variables. How can I do that in R?
Personally, I think that what you propose is scientific nonsense.
But if you must do this, you might check out the leaps package.
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/R-help-tp4539571p4539571.html
Sent from the R help mailing
*:length(comb1$ID))
This is a good example to show that it's usually better to
use seq_along() or seq_len() instead of 1:x.
Peter Ehlers
It works correctly as expected
Thanks again.
Navin
On Fri, Apr 6, 2012 at 9:56 AM, Berend Hasselmanb...@xs4all.nl wrote:
On 06-04-2012, at 13:14
the constants used in
swilk.c (in the R sources) which is a translation of the Fortran
code at http://lib.stat.cmu.edu/apstat/R94.
Peter Ehlers
With thanks,
Ted.
-
E-Mail: (Ted Harding)ted.hard...@wlandres.net
Date: 04-Apr-2012 Time: 23:06:32
.
Hmm, this list is generally more polite.
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Subscript-Error-tp4533219p4533219.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing
(., add = TRUE)
Peter Ehlers
On Tue, Apr 3, 2012 at 2:48 PM, Ravi Varadhanrvarad...@jhmi.edu wrote:
Hi,
Please see the attached contour plot (I am sorry about the big file). This was created
using the vis.gam() function in mgcv package. However, my question is
somewhat broader
ignore it.
(2) To force a parameter to be positive, see ?SSasymp or
for your case, perhaps ?SSasympOrig.
Peter Ehlers
Many thanks,
Nic Surawski.
--
View this message in context:
http://r.789695.n4.nabble.com/Non-linear-least-squares-tp4524812p4524812.html
Sent from the R help mailing list archive
?
I think that you don't understand the 'family=' argument in glm (nor,
perhaps, generalized linear models as such).
Hint: check ?family.
Peter Ehlers
Best regards,
Ioanna
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
distinguishes statistics from high-energy physics.
Peter Ehlers
__
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
) if(any(!is.na(y))) y)))
Hope this helps,
Rui Barradas
Or use complete.cases():
apply(x, 3, function(mat) mat[complete.cases(mat), ])
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/removing-NA-from-multidmension-arrays-tp4519369p4519750.html
Sent from the R help
that f return a list, then you
could use
(c, d) - unlist(f(a, b))
to get vector (c, d).
Peter Ehlers
__
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
be an integer, which presumably excludes a vector of
integers (cf ?rep.bigz and ?rep).
Arguably, it might be (marginally) worthwhile for rep.bigz
to spit out a warning message (something like that from if()
when that function is fed a condition of length 1).
Peter Ehlers
clearly stated there.
Peter Ehlers
On 2012-03-27 10:24, Nederjaard wrote:
Hello,
I'm new here, but will try to be as specific and complete as possible. I'm
trying to use “lm“ to first estimate parameter values from a set of
calibration measurements, and then later to use those estimates
there.
Peter Ehlers
On 2012-03-27 10:24, Nederjaard wrote:
Hello,
I'm new here, but will try to be as specific and complete as possible. I'm
trying to use lm to first estimate parameter values from a set of
calibration measurements, and then later to use those estimates to calculate
another set
-help/2012-March/307352.html
Peter Ehlers
__
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
of the 'groups' argument.
col.symbol = disruption + 1
or, better, for arbitrary colours:
mycols - c(2, 5)
xyplot(,
col.symbol = mycols[disruption + 1],
)
Peter Ehlers
Thank you in advance!
__
R-help@r
(...,
col.symbol =
mycols[dat$disruption[subscripts] + 1])})
BTW, your method of creating the data frame is unnecessarily complex.
It would suffice to use
dat - data.frame(person, time, etc)
Peter Ehlers
Hi everyone,
I am just trying to figure out how to do a xyplot where
On 2012-03-26 12:57, Sam Steingold wrote:
when subsetting a matrix results in a single row, it is converted to a
vector, not a matrix.
how do I avoid this?
Check ?[ and note the 'drop=' argument.
Peter Ehlers
1. __GOOD__
edges- get.edges(g,E(g))
edges
[,1] [,2]
[1,]02
google.
If this is the function circles() in package tripack, then I don't
think you can do what you want. Just look at the code - it's a very
small function.
But why not use the symbols() function? It has a 'bg' argument.
Peter Ehlers
Thanks!
John Muccigrosso
hand, if you're talking about R programming, then I can
recommend A First Course in Statistical Programming with R
by John Braun and Duncan Murdoch as a very nice introduction.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
help to solve the problem? Thanks in advance.
deb
You're using the wrong function; use write.table() instead.
You may want to set either or both of the arguments 'quote'
and 'row.names' to FALSE.
Peter Ehlers
__
R-help@r-project.org mailing list
https
){
if(length(unique(d[,'fam'])) 2) stop('only one family')
d2 - ddply(d,.(fam),function(x)x[sample(nrow(x), 1), ])
d2[sample(nrow(d2), 2), ]
}
Peter Ehlers
On 2012-03-22 16:03, Jorge I Velez wrote:
You could avoid the loop to run for ever by introducing a stop() check.
Here is an example
Check out the subplot() function in the TeachingDemos package.
Peter Ehlers
On 2012-03-22 12:28, Martin Renner wrote:
I used the function stars() to make barplot-like plots on a map. Now editor
wants us to use more traditional vertical barplots. Does anybody already have
some code that would
package:
library(plyr)
result - ddply(data, ID, summarize,
DIF.X = X[TIME==T2] - X[TIME==T1],
DIF.Y = Y[TIME==T2] - Y[TIME==T1])
Peter Ehlers
Thanks in advance
Sylvain Clément
__
R-help@r-project.org mailing list
https
- with(data,
aggregate(data[,-(1:2)], by=list(ID), FUN=diff))
This assumes that the dataframe is sorted as in your example. If
that's not the case, then use order to arrange it first:
data - with(data, data[order(ID, TIME), ])
Peter Ehlers
Le 21/03/12 11:03, Peter Ehlers
(types, ~~tau==, mytau, sep='~'))
plot(0)
legend('topright', legend=leg)
The '~' symbols generate spaces; use more if you want more spacing.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Here's the plyr way I should have thought of earlier:
require(plyr)
ddply(data, ID, numcolwise(diff))
Still requires your data to be ordered.
Peter Ehlers
On 2012-03-21 04:51, Eik Vettorazzi wrote:
Hi Sylvain,
assuming your data frame is ordered by ID and TIME, how about this
aggregate
])
)[2]
plot(0);legend(x=topright,legend=leg)
The idea is to create an expression vector and then
fill its components appropriately. We need the second
component of the substitute call.
Peter Ehlers
On 2012-03-21 06:49, ECOTIÈRE David (Responsable d'activité) - CETE
Est/LRPC de Strasbourg/6
of these names in your code. But since it's generally
better to use T1A[[name]] rather than T1A$name anyway,
the need for quotes should not be a problem.
Still, I wouldn't use illegal names.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch
vector of number of trials as the 'weights'
argument in the glm() call. See the Details section of ?glm.
Peter Ehlers
S Ellison***
This email and any attachments are confidential. Any use...{{dropped:8
() or a matrix x to locfit.raw.
Peter Ehlers
Please, somebody knows how can I get the estimated fitted values of both smooth
functions (m1) and (m2) using a local linear regression with kernel weights as
this example?
thanks a lot in advance I'm very desperate.
Alexandra
[[alternative HTML
amylase
2 604.90 2458.00
4 587.65 29954.55
6 493.60 13833.80
7 1211.00 4932.35
HTH,
Jorge.-
Or with the plyr package:
library(plyr)
ldply(auc_stress)
Peter Ehlers
On Mon, Mar 19, 2012 at 5:44 PM, David Perlman wrote:
I could do this in various hacky ways, but what's the right way
) when in fact it's still the whole matrix, presumably
coerced to a vector. Thus rtriang() will be fed values of 'mode'
that lie outside the interval [min, max] which I'm guessing causes
the warning.
Peter Ehlers
sapply(matrx, function(x) if( x==1){rnorm(4)} else {rnorm(4)})
[,1
of mt.sample.rawp
environment(myfun) - environment(mt.sample.rawp)
Peter Ehlers
On Thu, Mar 15, 2012 at 6:40 PM, Sarah Gosleesarah.gos...@gmail.comwrote:
Hi,
On Mar 15, 2012 4:28 AM, Aparna Sampathaparna.sampat...@gmail.com
wrote:
Hi All
I would like to compute the raw p-value from permutation tests
() on your files before importing.
Peter Ehlers
On Fri, Mar 16, 2012 at 10:59 PM, David Winsemius
dwinsem...@comcast.net wrote:
On Mar 16, 2012, at 1:11 PM, Ashish Agarwal wrote:
I want to import this CSV file into R.
The CSV file is
,,,1968,21,0
,,Boston,1968,13,0
,,Boston,1968,18,0
,,Chicago
If the OP just wants the last fitted value, use fitted():
dats - data.frame(x = 1:100, y = rnorm(100))
num.runs - 21
fitvec - numeric(num.runs)
for(i in seq_len(num.runs)){
fits - fitted(lm(y ~ x, data = dats[1:(80+i-1), ]))
fitvec[i] - tail(fits, 1)
}
Peter Ehlers
On 2012-03-16 14:05, R
?integer) and I think that
setting it to Inf is no longer legal (if ever it was).
[Perhaps options() should generate a warning.]
Peter Ehlers
Syb
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch
..: FUN did not always
return a scalar
Suggestions?
Are you using an old version of R (prior to 2.11.0)?
Anyway, you might also check the plyr package's summarize() function.
Or check out the data.table package.
Peter Ehlers
Regards,
Michael
-Original Message-
From: David
xx- c(1, 1, 2, 10, 100, 10,1)
boxplot(xx)
For graphical analysis, I would prefer plot(xx, type=h).
But most different as compared to the others is not
well-defined. Possibly something like scale(xx) would help.
Peter Ehlers
After this it gets more complicated, but it you're new here let's take
Michael (OP),
Not that it's necessary, but you might also find
confint(aa)
to be instructive.
Peter Ehlers
On 2012-02-29 07:20, R. Michael Weylandt wrote:
Formally, look at Pr(|z|). Informally, look at the null and residual
deviances from print(aa).
Michael
On Wed, Feb 29, 2012 at 10:14 AM
:
If response is a matrix a linear model is fitted separately by
least-squares to each column of the matrix.
Peter Ehlers
But apparently it does not work.
For about four or five reasons.
.
David Winsemius, MD
West Hartford, CT
__
R-help@r
= PARAMETERS[i, color])
}
I haven't followed this thread carefully so this may already have been
suggested: can't you just replace the plot(), lines() calls with
something like
matplot(x,t(densities),type='l',lty=1,col=PARAMETERS$color,
ylab = Density, main = SPX)
?
Peter Ehlers
, 1:9, axes=FALSE, frame=TRUE)
axis(1, at=c(1,4,7), col.ticks=2, lwd.ticks=2)
axis(1, at=c(2,5,8), col.ticks=3, lwd.ticks=2)
axis(1, at=c(3,6,9), col.ticks=4, lwd.ticks=2)
Add col.axis=yourColourChoice arguments if you also want
coloured labels.
Peter Ehlers
quote
From: Hans W
seeking a solution this way.
I thought that Bert had given you the answer; try this:
aa - runif(15)
bb - rnorm(30)
cc - rnorm(50,sd=2)
z - c(aa,bb,cc)
g - rep(LETTERS[1:3],c(length(aa),length(bb),length(cc)))
boxplot(z ~ g)
Peter Ehlers
On Mon, Dec 12, 2011 at 4:09 PM, Vining
().
Peter Ehlers
Thank you for your kind help in advance,
Alexandre
--
View this message in context:
http://r.789695.n4.nabble.com/axis-thickness-in-plot-tp4165430p4165430.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r
to print appropriate axis
labels.
Peter Ehlers
[[alternative HTML version deleted]]
__
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
'.
You might also avoid using 'paste' in your expressions;
Try replacing
expression(paste(Observed,italic(bar(EC)[e])))
with
expression(Observed~italic(bar(EC)[e]))
Peter Ehlers
sessionInfo()
R version 2.13.2 (2011-09-30)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE
. Can somebody help me on where to find that?
Try this:
https://svn.r-project.org/R/trunk/src/library/stats/src/approx.c
You'll find code for both approxtest and approxfun.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch
I must be missing something. What's wrong with
t(apply(mat, 1, sample))
?
Peter Ehlers
On 2011-11-16 12:12, Gavin Simpson wrote:
On Wed, 2011-11-16 at 14:29 -0500, R. Michael Weylandt wrote:
Suppose your matrix is called X.
? sample
X[sample(nrow(X)),]
That will shuffle the rows
'. A worthwhile exercise might
be to test several other distributions on your data.
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/error-while-using-shapiro-test-tp3861535p3863205.html
Sent from the R help mailing list archive at Nabble.com
intro to R text, has no help page I can find.
grrr
Look for 'dot-dot-dot' in the 'R Language Definition' manual
(sec. 2.1.9).
Peter Ehlers
Your function is still not doing what I am trying to do, doubtless because I
was not clear enough in the question I pose At the bottom of this message I
have
has given you one fix. Here's another (see ?'c'):
iwish-list()
for(p in seq_along(biglist)){
if(!is.na(lilwin[[p]]))
iwish - c(iwish, biglist[[p]][lilwin[[p]]])
}
BTW, it's not a good idea to use 'F' instead of FALSE and the
negation operator is usually a better way to test.
Peter
of the error msg
shows that the OP (without mentioning that salient fact) used a
different set of values to fit.
Peter Ehlers
The salient issue is that the answers obtained by applying fitdistr()
directly (without re-scaling)
differ substantially from those obtained after rescaling. With only 20
of 'An Introduction to R'
likely would be profitable.
Peter Ehlers
Thanks.
--
View this message in context:
http://r.789695.n4.nabble.com/cdplot-error-tp3714454p3714454.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
the code for the density rectangles in hist.default
where 'counts' is computed and followed with
dens - counts/(n * diff(breaks))
You might find the code for truehist() in the MASS package easy to
follow.
To see how hist.constructor calls hist():
lattice:::hist.constructor
Peter Ehlers
Any
, subscripts){
x - seq_along(subscripts)
panel.xyplot(x, y)
}
)
Peter Ehlers
Thanks.
KR,
-Thorn
__
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
(double, length) : invalid 'length' argument
What's the problem?
You should at the very least provide your sessionInfo().
Peter Ehlers
Gilbert
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
Does
xyplot(y ~ seq_along(y), xlab = Index)
do what you want?
Peter Ehlers
On 2011-08-02 09:07, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote:
Dear all,
How can I make an index plot with lattice, that is plotting a vector
simply against its particular index in the vector, i.e
. Your results just show that this can be sensitive
to the degree of rounding used for the theoretical cdf.
Peter Ehlers
On 2011-07-29 02:07, Jochen1980 wrote:
Hi,
I got two data point vectors. Now I want to make a ks.test(). I you print
both vectors you will see, that they fit pretty fine. Here
,
and you might also set the optim method to BFGS
(which, BTW, is the default in fitdistr()).
library(fitdistrplus)
fitdist(vectNorm, beta,
start = list(shape1 = 2.15, shape2 = 810),
optim.method = BFGS)
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Beta
want the space.
Peter Ehlers
I will be glad for any help on how to label 10^-8 st km^-2day^-1 on the
axis.
Many thanks
Regards
Ogbos
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
in inherits(x, data.frame) : object 'dta' not found
But ?update tells us that we can provide additional or changed
arguments to the call. So an easy fix is:
update(models[[1]], . ~ ., data = dat)
or
update(models[[1]], . ~ ., data = model.frame(models[[1]]))
Peter Ehlers
However, if I try
=expression(paste(Prob[, X= x, ])))
lines(ecdf(x), cex=.5)
The problem also occurs if I use instead ylab=expression(prob(X= x)))
Does the problem occur if you use ylab=expression(Prob[X = x])?
Peter Ehlers
All is well if I remove = but I need=.
Frank
-
Frank Harrell
Department
On 2011-07-28 01:11, Zhongyi Yuan wrote:
Thank you Tyler.
I thought the problem was due to the use of expression(...).
Also note that you can simplify your legend text:
c(expression(alpha == 1), expression(alpha == 2))
In general, I find that paste() is overused in plotmath.
Peter Ehlers
doing any specific correction for the missing values?
?lm tells you what lm() is doing about missing values. I don't know
what the plm [sic] package does. If you post a *minimal*
example (*not* in HTML) showing the problem, you're likely to
get someone to offer assistance.
Peter Ehlers
I really
$site), lwd = 2)),
panel = mypanel.Dotplot)
where mypanel.Dotplot() is panel.Dotplot() with the modified
line as indicated above.
Peter Ehlers
You might be able to get customized results with panel.arrow.
Dieter
--
View this message in context:
http://r.789695.n4.nabble.com/color
three rows, whereas I would like to rescale that of
only row #1. Is there a simple way of doing this?
I think that you'll have to make 3 columns:
layout(matrix(c(1,1,2,3,4,4,5,6,6), 3, 3, byrow = TRUE),
widths = c(3.5, 1.5, 2))
layout.show(6)
Peter Ehlers
Thanks,
Manojit
, linfct = mcp(f_GROUP=Tukey) )
Error in `[.data.frame`(mf, nhypo[checknm]) : undefined columns selected
I can't find out the reason for Error.
I think glht() is looking for f_GROUP in data_ori.
You have defined f_GROUP in your global environment but
have not added it to your dataframe.
Peter
, random = ~ time | ID,
data = data_ori)
glht(result, linfct = mcp(f_GROUP = Tukey))
#Error in `[.data.frame`(mf, nhypo[checknm]) : undefined columns
# selected
(Note that I changed data_ori$f_GROUP to data_ori$GROUP.)
Peter Ehlers
Any help from you are welcome.
Many thanks
= .8, corner = c(0, 0),
points = list(pch=22, col=c(2,4,3), cex=1.5),
text = list(levels(iris$Species
?xyplot gives a number of other key() parameters that can be
adjusted.
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Lattice-choice
(
axis.components=list(
left=list(pad1=0.5
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Lattice-distance-of-tick-labels-from-axis-line-tp3693014p3693014.html
Sent from the R help mailing list archive at Nabble.com
with.
Peter Ehlers
HTH,
Denes
Hi all,
I'm trying to identify a particular digit or value within a vector of
factors. Specifically, this is environmental data where in some cases the
minimum value reported is a particular number (and I want to
manipulate
only these). For example:
x-c
the records
after 4? Can anyone suggest a good way to do this?
Just subset in your function definition:
mean(df$x) -- mean(df$x[1:4])
But I would use summarize:
ddply(df, .(fac), summarize, x.avg = mean(x[1:4]), n = length(x))
Peter Ehlers
I am using R 2.12.1 and Emacs + ESS.
Thanks so much
18
9 0.4121185 Maine19
10 -0.5440211 JUNK -99
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
Here's another solution, using within():
within(df, {Name[Size0] - 'JUNK'
Value[Size0] - -99})
But I like William's simple list() solution.
Peter Ehlers
(20))
idx - which(dat$y 17)
dat2 - data.frame(x=c(999,-889,777), y=c(-44,NA,0))
dat[idx, ] - dat2
dat
Peter Ehlers
sincerely,
/iaw
Ivo Welch (ivo.we...@gmail.com)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
(..., na.action = na.exclude) but cv.glm() appears not (yet)
to be coded to handle padding of missing values.
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/cv-glm-and-longer-object-length-is-not-a-multiple-of-shorter-object-length-error-tp3685622p3685622.html
Sent from
= FALSE)), ...)
Peter Ehlers
is what you want.
-- Bert
On Fri, Jul 22, 2011 at 6:07 AM, marcelmarcelcur...@gmail.com wrote:
I notice that with this solution there are still y-axis tick marks on both
sides of the plot. Is there a way to remove the ones on the right side?
--
View this message
a par.settings argument to your plot definition:
xyplot(...,
par.settings = list(
layout.widths = list(ylab.axis.padding = 0.5)))
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Lattice-distance-of-Y-axis-label-from-plot-tp3686855p3686855.html
Sent from
,)
# note 1,2,3 spaces to make rownames unique
mat.tb - xtable(mat, align=c(r,c,c))
mat.tb
Peter Ehlers
__
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
to
replace x[3,2] by x[2,2]. Similarly, I want to replace x[5,2] with x[4,2],
which means that for duplicate entries in the 1st column, I want to replace
the corresponding entries in the 2nd column with its 1st entry of the
duplicate row.
Try match():
idx - match(x[,1], x[,1])
x[,2] - x[idx,2]
Peter
(plot1, position=c(0,0,1,.6))
Maybe just:
xyplot(, scales = list(x = list(draw = FALSE)), )
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Lattice-place-ticks-only-on-y-axis-tp3684094p3684094.html
Sent from the R help mailing list archive at Nabble.com
.
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/read-csv-help-tp3677454p3677586.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
() often.
This 'exact' code worked in the past?
Peter Ehlers
The model is fine, but it's the plotting of the model that escapes me.
I'm running R version 2.12.1 on a Windows 7 machine.
Thanks for your help -
Steven H. Ranney
http://stevenranney.blogspost.com
http://www.steven-ranney.com
201 - 300 of 1249 matches
Mail list logo