Greg,
It might be better to use ylim = c(min(x), 0)
in place of ylim = c(-4, 0). I don't think plt can take
negative values.
Peter Ehlers
Greg Snow wrote:
> Here is one approach. It uses the function clipplot which is shown
> below (someday I will add this to my TeachingDemos package, the
> Te
I don't understand the question. What's wrong with showing 26.94350 as
being less than all the other leiji values?
Peter Ehlers
zhang jian wrote:
> I think there is a question in R. I donot know the reason.
> This is my data about comulative percentage figure. The result is not right.
>
> The
tolower(names(DataTABLE))
Peter Ehlers
Milton Cezar wrote:
> Dear All,
>
> I have read a table using
> DataTABLE <- read.table("mytable.txt, header=T)
>
> And get the following data structure
>Var1 VAR2 VaR3 Var4 ...
>
> How can I list all collumn names (in l
Hi Max,
You have 'title' as a component of the 'text' component of key.
According to the help page for xyplot, 'title' is a component
of key. AFAICS, 'text' does not have a 'title' component.
Peter Ehlers
Kuhn, Max wrote:
> Hi,
>
> I'm creating some lattice plots that have a key and I'd like to
mtext() is not a lattice function. Could you not use the 'main'
argument?
Peter Ehlers
Marius Hofert wrote:
> Hello,
>
> I would like to create a sequence of plots (using a for loop). I read
> in the FAQ that print() has to be used in order to obtain any output.
> This works perfectly fine
Looks like a bug (in mvt()?). Note that
pmvnorm(lower = c(-Inf, -Inf), upper = c(Inf, 10))
works as expected, as does replacing any of the 4 Infs with a finite
value.
Function sadmvn() in pkg:mnormt does give 1 with Inf lower/uppers.
Peter Ehlers
Daniel Yang wrote:
> Dear R-help,
>
> Is t
[EMAIL PROTECTED] wrote:
> Dear all,
>
> I am doing something wrong.
>
> I am trying to apply a formula for sample size calculation as in the book
> "Design and Analysis of Clinical Trials", from Chow et all.
>
> There a suggested sample size strategy uses the formula
>
> 0.30/0.45=F(0.80,2n,
> Dear Peter,
>
> Won't that wipe out the other components of axis.text, etc.?
>
> Regards,
> John
>
> On Thu, 25 May 2006 06:22:22 -0600
> P Ehlers <[EMAIL PROTECTED]> wrote:
>
>>John Fox wrote:
>>
>>
>>>Dear Emilie,
>&
John Fox wrote:
> Dear Emilie,
>
> This is, I guess, the effect() function in the effects package. If so,
> note that the plot.effect() method uses trellis graphics (via the
> lattice package), not standard R graphics, so you have to control
> aspects of the plot in a manner consistent with trel
Fixed in 2.3.1beta. See NEWS.
Peter
Gorjanc Gregor wrote:
> Hello!
>
> I was just caught with the following:
>
>
>>mean(NA)
>
> [1] -2147483648
>
> Is this OK. I thought that I should get NA. I use R 2.3.0
>
> --please do not edit the information below--
>
> Version:
>
> platform = i3
Sara,
You didn't read your data into R correctly.
If your data are really in the form you posted (one long column
of mixed data types and lots of blank lines), then I would:
1. remove the blank lines with my text editor and save (say, mydata.txt)
2. scan() the variable names into a vector
nm
Is this what you're after?
> pos
[1] 120 134 156 169 203
> dat2
Col1 Col2 p.val
112 0.45
212 0.56
323 0.56
423 0.68
523 0.88
634 0.76
735 0.79
835 0.92
plot(pos, rep(0, 5), type = "n", ylim = c(0, 1))
with(dat2, segment
'An Introduction to R', section 2.6 couldn't really be any clearer.
You'll find the document on your computer.
Peter Ehlers
YIHSU CHEN wrote:
> Dear R users:
>
> I have an elementary question: how to creat a vector of [A1, A2, A3..
> A300]? I know c(1:300) would give 1, 2, 3, , 300 bu
[EMAIL PROTECTED] wrote:
> hello,
>
> i do the following in order to get an persp-plot
>
> x<-c(2,2,2,2,2,2,3,3,3,3)
> y<-c(41,41,83,83,124,166,208,208,208,208)
> z<-c(90366,90366,92240,92240,92240,96473,100995,100995,100995,100995)
> x<-data$x
> y<-data$y
> z<-matrix(data$z,length(y),length(x))
Dimitri,
coef(summary(your model)) pulls out the matrix of coefs/SEs/etc.
You could subset that.
Peter Ehlers
Dimitri Szerman wrote:
> Hi,
>
> I'm running a regression using lm(), in which one of the right-hand side
> variables is factor with many levels (say, 80). I am not intersted in the
>
Or, possibly slightly simpler:
ok <- (x %% 2) * (y %% 2)
d[ok == 1, ]
Peter Ehlers
Petr Pikal wrote:
> Hi
>
> I coords was data frame you could use some arithmetic to get
> selection criteria for both numbers odd. In case of matrix you need
> to use coords[,1]*coords[,2] instead
>
> trunc((
Asako,
My copy of MASS4 has been borrowed. But you can have a look at
Julian Faraway's "Practical Regression and Anova using R" in
the Contributed Documentation section of CRAN. See section 2.9.
In MASS, look for 'vcov'.
Peter Ehlers
asako Ishii wrote:
> Peter,
>
> Thank you very much for you
Duncan Murdoch wrote:
> On 3/23/2006 10:34 AM, Peter Ehlers wrote:
>
>> Duncan Murdoch wrote:
>>
>>> On 3/23/2006 7:35 AM, Thomas Steiner wrote:
>>>
a) How can I set the recording of all windows()-history forever to
"true"? I want something like windows(record = TRUE) but not just for
I think your problem is the definition of abarley. You're making
ayield into a factor. Have a look at str(abarley).
Peter Ehlers
[EMAIL PROTECTED] wrote:
> Dear ladies and gentlemen!
>
> In the help text for the xyplot (library(lattice), help(xyplot)) is an example
> given how one can use barcha
Eric Archer wrote:
> R-help,
>
> I'm getting some unexpected behavior with subsetting a data frame
> (aircraft flight data) that I can't sort out.
> Here is a simplified version of my data frame and problem:
>
> > flight
> FlightID TailNo FlightDate HobbsTime FlightCost Date year
Barry,
Try the latest _patched_ version. I'm on 2006-02-12, but that may
already be superseded. I get var(x) = 0.
Peter Ehlers
Barry Zajdlik wrote:
> Hello all,
>
> Thanks for the responses but I am still annoyed by this seemingly simple
> problem; I recorded sessionInfo() as below.
>
> x<-rep(
Taka,
Maybe you did something strange when you "replaced Y1's values ".
Is the result a 10-level factor?
The following works for me.
x1 <- sample(c("y", "n"), 100, replace = TRUE)
x2 <- sample(c("a", "b"), 100, replace = TRUE)
y <- sample(1:10, 100, replace = TRUE)
y <- factor(y)
dat <- da
Alexandra,
I haven't seen an answer to your query yet, so let me give it a shot.
First, I would not use R-illegal variable names (I assume you
want 2004-12-30, etc, to be your colnames). Try replacing them
with A,B,C, etc. And delete the empty string at the start.
Then I would make sure that ther
ahimsa campos arceiz wrote:
> Sorry I have a very simple question:
>
> I used somers2 function from Design package:
>
>
>>z<- somers2(x,y, weights=w)
>
>
> results are:
>
>
>>z
>
> CDxynMissing
> 0.88 0.76 5000.00
>
> Now I want to call only the value of C to be used
Marc Schwartz wrote:
> On Thu, 2005-12-29 at 14:49 +0100, Andrej Kastrin wrote:
>
>>Dear R users,
>>
>>is there any simple low-level function that split "single-line" graph
>>labels and produce something like (e.g. for x axis):
>>
>>100300500 700...
>> 200400 600
>>
>>Cheer
Try this:
x <- c(1, 1e6); y <- 0:1
par(mar = c(5, 4, 4, 5) + 0.1) # make room at the right
plot(x, y, axes = FALSE)
box()
axis(2)
axis(1, at = 0:5 * 2 * 1e5, labels = 0:5 * 2)
mtext(text = expression(phantom(0)%*%10^5),
side = 1, line = 1, at = 11.0 * 1e5)
Peter Ehlers
[EMAIL PROTECTED]
Just use two title()s:
plot(1)
title("Main Title", cex.main=2)
title(sub = "sub title", cex.sub = 0.75, adj = 0)
Peter Ehlers
Ronnie Babigumira wrote:
> Thank you all, ?sub did the trick. One more question, Is it possible to
> orientate the "sub title" independently from the
> "main title".
?mtext
Peter Ehlers
Ronnie Babigumira wrote:
> Hi, I have done a search on this in vain. How can I add a note to the foot of
> a graph example below
>
> |---|
> | Title |
> | |
> | | my | |
> | | graph | |
> | |
Subhabrata wrote:
> Hello R-experts,
>
> I have a set of data as follows:
>
> age time
> 1 281
> 2 532
> 3 533
> 4 364
> 5 544
> 6 464
> 7 455
> 8 316
> 9 537
> 10 357
> 11 628
> 12 198
> 13 432
> 14 513
> 15 45
Good point. I actually keep packages that aren't installed with
R in a separate directory. I set .libPaths via R_LIBS.
Peter Ehlers
Uwe Ligges wrote:
> P Ehlers wrote:
>
>
>>This might not be the preferred way, but can one not also
>>do this by appropriately assign
This might not be the preferred way, but can one not also
do this by appropriately assigning .libPaths?
Peter Ehlers
Uwe Ligges wrote:
> Helmut Kudrnovsky wrote:
>
>
>>hi R-users,
>>
>>a few days ago R 2.2.1 came out. on my win xp i'installed R 2.2.0. along the
>>time i've installed a lot of
While I appreciate the availability of axis.break, I agree with Hadley
in this case. I would provide two plots, with and without the special
point. Or just the density plot and some numbers. Broken axes require
interpretation which is often easier to do using numbers, e.g. the
mean or range (exclus
Peter,
You're right, of course, as usual. Sorry about that.
Peter E.
Peter Dalgaard wrote:
> P Ehlers <[EMAIL PROTECTED]> writes:
>
>
>>>so a good guess at its definition is that it is obtained from W or one
>>>of the others by subtracting the mean and d
Peter Dalgaard wrote:
> Bob Green <[EMAIL PROTECTED]> writes:
>
>
>>An earlier post had posed the question: "Does anybody know what is relation
>>between 'T' value calculated by 'wilcox_test' function (coin package) and
>>more common 'W' value?"
>>
>>I found the question interesting and ran t
What OS? In Windows, what's wrong with pressing Ctrl-L?
Peter Ehlers
Manel Salamero wrote:
> Hi,
>
> Someone can tell me a function for clearing the console without using the
> menu bar?
>
> Thanks,
>
> Manel
>
> __
> R-help@stat.math.ethz.ch mail
Eric,
Have you tried just copying your data from your email (this mail, e.g.)
to your preferred text editor, removing any mailer-inserted leading
characters, ensuring a newline at the end of the last line, and then
using read.table (perhaps via the clipboard if you're on Windows)?
Works for me wit
Guillaume,
Will functions unique() or duplicated() help you?
(Comment on trailing ";" withheld so as not to revive recent thread.)
Peter Ehlers
[EMAIL PROTECTED] wrote:
> hi all,
>
> I've got a data frame, this data frame have 76 columns and 22600 rows.
> The data inside can be redundant becau
Guillaume,
I assume that 'tab' is a data frame and that, for some
unspecified reason, you want to get two subsets of the last
column of tab, overlapping one case, and coercing the final
result to a data frame. If that is correct, then
as.data.frame(c(tab_tmp, tab_tmp1))
will give you a data fram
As usual, Gabor provides an elegant solution. But I hope that, in
this case, the OP provided a toy example. Otherwise, I don't see
the point of applying cut() to a vector of length 7. Why not just
use stripchart()?
Peter Ehlers
Gabor Grothendieck wrote:
> Or building on that solution but elimina
Oh Patrick, surely German Capitalization is better!
:)
Peter
Patrick Connolly wrote:
> On Tue, 06-Dec-2005 at 04:21PM +, Patrick Burns wrote:
>
> |> I don't put in extraneous ';' because I maybe get a
> |> blister on my little finger.
> |>
> |> I suspect that those who find the semi-colon
I don't have an answer to your query, but I do have
three suggestions:
1. Use a sensible subject line. This may be "urgent" to
you, but I doubt that it is to anyone else.
2. Do indicate what package contains multhist(). I have
no idea (nor do I know what a 'multi histogram' is).
3. Don't send HT
[EMAIL PROTECTED] wrote:
> Martin Maechler a écrit :
>
>
>>please, please, these trailing ";" are *so* ugly.
>>This is GNU S, not C (or matlab) !
>>
>>but I'll be happy already if you could
>>drop these ugly empty statements at the end of your lines...
>
>
> May I disagree ?
> I find miss
(Haven't seen an anwer to this yet; maybe I missed it.)
klebyn wrote:
>
>
> Hello
>
>
>
> I do not know very much about statistics (and English language too :-( ),
> then I come in search of a clarification (explanation):
>
> I found two distinct results on KURTOSIS and
> I do not know whic
Kjetil Brinchmann Halvorsen wrote:
> P Ehlers wrote:
>
>> I'd like to add two comments to Martin's sensible response.
>>
>> 1. I've seen several intro-stats textbooks that define a
>> boxplot to have whiskers to the extreme data values
>> and
I'd like to add two comments to Martin's sensible response.
1. I've seen several intro-stats textbooks that define a
boxplot to have whiskers to the extreme data values
and then define Tukey's boxplot as a "modified" boxplot.
I wish authors wouldn't do that.
2. I've also seen boxplots used for sa
Vasu,
You have a lot of problems here.
1. How was your file generated? Excel? You have trailing tabs on
all but row 1 which is why your read.table call with sep="\t"
gives you columns that don't seem to agree with what you expect.
See the argument row.names in ?read.table.
2. It's never a good i
Urania,
I'm not very fond of "putting additive residuals on the righthand side".
This practice tends to obscure the fact that we're fitting a conditional
mean function:
E(Y|x) = function(x; parameters)
We then need to assess the model fit and uncertainties of parameter
estimates. We may want t
sting."
I would use the technique only in an exploratory setting, i.e. one that
might help me to refine further experimentation.
Peter
>
>
> Citando P Ehlers <[EMAIL PROTECTED]>:
>
>
>>Antonio Olinto wrote:
>>
>>
>>>Hello,
>>>
>&g
Marc Schwartz wrote:
> On Thu, 2005-11-24 at 21:55 +, Ted Harding wrote:
>
>>On 24-Nov-05 P Ehlers wrote:
>>
>>>Bianca Vieru- Dimulescu wrote:
>>>
>>>>Hello,
>>>>I'm trying to calculate a chi-squared test to see if my
Antonio Olinto wrote:
> Hello,
>
> I have a doubt in using the function step (step wise) to select glm models.
>
> Usually I apply the gamma distribution to analyze fishery data. To select the
> terms I use a routine where I first compare single term models to the null
> model
> (eg. U~1 vs. U
Bianca Vieru- Dimulescu wrote:
> Hello,
>
> I'm trying to calculate a chi-squared test to see if my data are
> different from the theoretical distribution or not:
>
> chisq.test(rbind(c(79, 52, 69, 71, 82, 87, 95, 74, 55, 78, 49,
> 60),c(80,80,80, 80, 80, 80, 80, 80, 80, 80, 80, 80)))
>
>
Is qq.plot in package 'car' of use to you? I think that it
requires your distribution to be one of those available in R.
Peter
Clark Allan wrote:
> hi all
>
> i would like to know if anyone has a reference on how one would place
> the "bands" on the pp plot.
>
> i want to test whether or not a
P Ehlers (that's me) wrote:
> My guess is that you have an object 'T' hanging around.
> Like Berton, I get no error until I define:
>
> T <- 0:1
>
> and then run your test case, resulting in the warnings.
>
> Peter
>
>
> Ravi Varadhan
My guess is that you have an object 'T' hanging around.
Like Berton, I get no error until I define:
T <- 0:1
and then run your test case, resulting in the warnings.
Peter
Ravi Varadhan wrote:
> Hi,
>
>
>
> I apologize for the previous posting, where the message was not formatted
> properl
This should work:
update.packages(ask = "graphics", repos = NULL,
contriburl = "file:///g:/myFolder/myRepository"))
-peter
Muhammad Subianto wrote:
> I try to update R packages via my local repository.
> I put all R packages in g:/myFolder/myRepository, I do like
>
>
>>library(tools)
>>wr
Jarrett Byrnes wrote:
> Quick question, as I attempt to learn R. For post-hoc tests
>
> 1) Is there an easy function that will take, say the results of
> tukeyHSD and create a grouping table. e.g., if I have treatments 1, 2,
> and 3, with 1 and 2 being statistically the same and 3 being diff
[EMAIL PROTECTED] wrote:
> Does anyone know how I can set up R so that when I make a graphic, the
> graphics window remains behind the console window? It's annoying to
> have to reach for the mouse every time I want to type another line of
> code (e.g., to add another line to the plot). Thanks.
I
Since there is nothing wrong with
for(i in 1:nr - 1)
R can't really do much more than point to where your code
fails due your incorrect assumption about operator precedence.
You're certainly not the first to fall into this trap. But it's
not that hard to diagnose. Anytime I have problems with a l
I think your guess about stack overflow is probably correct and I
definitely don't think it's worth wasting effort recoding.
Peter Ehlers
Prof Brian Ripley wrote:
> If this is stack overflow (and I don't know that yet: when I tried this on
> Windows the traceback was clearly corrupt, referring
P Ehlers wrote:
>
> Prof Brian Ripley wrote:
>
>> On Wed, 17 Aug 2005, Greg Hather wrote:
>>
>>
>>> I'm having trouble with the wilcox.test command in R.
>>
>>
>>
>> Are you sure it is not the concepts that are giving 'tro
Prof Brian Ripley wrote:
> On Wed, 17 Aug 2005, Greg Hather wrote:
>
>
>>I'm having trouble with the wilcox.test command in R.
>
>
> Are you sure it is not the concepts that are giving 'trouble'?
> What real problem are you trying to solve here?
>
>
>>To demonstrate the anomalous behavior of
61 matches
Mail list logo