Re: [R] Conditional looping over a set of variables in R

2010-10-24 Thread Peter Ehlers
This won't be as quick as Bill's elegant solution, but it's a one-liner: apply(d, 1, function(x), match(1, x)) See ?match. -Peter Ehlers On 2010-10-22 10:36, David Herzberg wrote: Bill, thanks so much for this. I'll get a chance to test it later today, and will post the outcome. David

Re: [R] Conditional looping over a set of variables in R

2010-10-24 Thread Peter Ehlers
Whoops, got an extra comma in there somehow; should be: apply(d, 1, function(x) match(1, x)) -Peter Ehlers On 2010-10-24 08:17, Peter Ehlers wrote: This won't be as quick as Bill's elegant solution, but it's a one-liner: apply(d, 1, function(x), match(1, x)) See ?match. -Peter

Re: [R] Conditional looping over a set of variables in R

2010-10-26 Thread Peter Ehlers
with it? -Peter Ehlers On 2010-10-26 07:50, David Herzberg wrote: Thank you - I will try this solution as well. Sent via DROID X -Original message- From: Petr PIKALpetr.pi...@precheza.cz To: David Herzbergdav...@wpspublish.com Cc: Adrienne Woottenamwoo...@ncsu.edu, r-help@r

Re: [R] anomalies with the loess() function

2010-10-26 Thread Peter Ehlers
' will no longer be paired. Another reason to prefer dataframes. #check out the evidence.something's wrong with loess()??? There's nothing wrong with loess; it just needs more than a single intercept and slope to plot its predictions. -Peter Ehlers par(mfrow=c(1,2)) plot(a,b) lines(lowess(a,b

Re: [R] trouble with histograms

2010-10-27 Thread Peter Ehlers
- stack(DF) DF ## use xtabs() to tabulate the values xtDF - xtabs( ~ ., DF) ## transpose so that columns are the heights to ## feed to barplot() heights - t(xtDF) barplot(heights, col=2:4) -Peter Ehlers __ R-help@r-project.org mailing list

Re: [R] plot by cathegories within a factor

2010-10-27 Thread Peter Ehlers
)) With lattice: xyplot(Trait ~ Age | Group, data = x) (I suspect that both Group and Age should really be factors, which would improve the plot.) -Peter Ehlers Le 10/27/2010 11:21, Rosario Garcia Gil a écrit : Hello I have a data set summarized like this: File name= Height Group Ind Age Trait 1

Re: [R] One silly question about tapply output

2010-10-27 Thread Peter Ehlers
) -Peter Ehlers Thanking in advance. Regards Vincy __ 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

Re: [R] Conditional looping over a set of variables in R

2010-10-27 Thread Peter Ehlers
only the target result. Use unname(x) or as.vector(x) on the result. -Peter Ehlers Regards, David S. Herzberg, Ph.D. Vice President, Research and Development Western Psychological Services 12031 Wilshire Blvd. Los Angeles, CA 90025-1251 Phone: (310)478-2061 x144 FAX: (310)478-7838 email

Re: [R] Returning highs and lows in R

2010-10-28 Thread Peter Ehlers
? -Peter Ehlers Thanks, Jason GLD.Close 2010-10-01128.91 2010-10-04128.46 2010-10-05130.99 2010-10-06131.81 2010-10-07130.37 2010-10-08131.66 2010-10-11132.29 2010-10-12131.96 2010-10-13134.07 2010-10-14134.75 2010-10-15133.68 2010-10-18

Re: [R] How to control in order of groups in xyplot

2010-10-31 Thread Peter Ehlers
problem. That would be the best way for this (common) situation since the ordering is not likely to be wanted in any other way. For playing with different orderings, lattice provides the index.cond argument described in the '...' part of help(xyplot). -Peter Ehlers Hope it helps, Rainer

Re: [R] aspect ratio 1 and blank space

2010-11-17 Thread Peter Ehlers
to lead to some 'extension' of the xlims. If you want to avoid that, you'll have to specify different height/width values, something like: x11(height = 7, width = 7 * (100 - 0)/(70 + 80)) and then place your plot call. You might also want to set the xaxs and/or yaxs parameters. - Peter Ehlers

Re: [R] problems subsetting

2010-11-18 Thread Peter Ehlers
AND This indicates that you haven't looked at (or absorbed) the help page for logic operators. It's pretty well explained there that both and perform AND, but the first is for elementwise comparison which is what your application clearly requires. -Peter Ehlers Thanks a lot. Martin On 11/18

Re: [R] plot(x,y xlab=NULL,ylab=NULL) but labels still visible.

2010-11-21 Thread Peter Ehlers
are directed by ?plot. 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.

Re: [R] is it possible to put tick labels inside plotting area ?

2010-11-21 Thread Peter Ehlers
. If you want your tick marks to point inward, you might also have a look at par(tcl = ). 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

Re: [R] Making a line in a legend shorter

2010-11-22 Thread Peter Ehlers
to lengthen the segment. Maybe this post will help you: https://stat.ethz.ch/pipermail/r-help/2010-July/246599.html Peter Ehlers Thank you Felipe Parra [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] sm.ancova graphic

2010-11-22 Thread Peter Ehlers
to the maintainer of sm. Peter Ehlers Thank you in advance, Lucía [[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

Re: [R] plotting a timeline

2010-11-22 Thread Peter Ehlers
(-.7,1.2)) points(eventtime, impact, pch=95, font=5, cex=2, col=4) text(eventtime, impact, label, pos = 1 + 2*(impact 0)) }) abline(h=0, lwd=2) axis(1, pos=0, lwd=2, lwd.ticks=1) Peter Ehlers -- mrgomel --- Below is my example code in R: the_data- structure(list

Re: [R] Aligning Grid Lines with Date Ticks in Trellis Plot

2010-11-24 Thread Peter Ehlers
,...) }) or, putting the grid call inside the panel.xyplot: xyplot(value ~ date, data=X, panel=function(x,y,...) { panel.xyplot(x, y, grid=list(v=-1, h=-1, col=3, x=x, y=y), ...)) }) Peter Ehlers Thanks. - Elliot

Re: [R] overlap cdf plots and add colors and etc

2010-11-25 Thread Peter Ehlers
) is in the posting guide, but it seems that nobody wants to read that quite brief document. Peter Ehlers From: Jorge Ivan Velezjorgeivanve...@gmail.com Cc: r-help@r-project.org Sent: Thu, November 25, 2010 4:46:37 PM Subject: Re: [R] overlap cdf plots and add

Re: [R] Applying function to elements of matrices in a list

2010-11-25 Thread Peter Ehlers
even the median. Is there a way to apply a generic function in the manner I described? You could use the abind function in the abind package to convert your list to a 3d array and then use apply on that: require(abind) xa - abind(x, along=3) apply(xa, 1:2, mean, trim=0.3) Peter Ehlers

Re: [R] moving xlabels in lattice

2010-11-25 Thread Peter Ehlers
= list( xlab = 3 # axis.xlab.padding = 3 # axis.bottom = 3 ))) Comment/uncomment to suit. 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

Re: [R] Problem with plotting diagnostics - Error in object$coefficients : $ operator is invalid for atomic vectors

2010-11-25 Thread Peter Ehlers
how you are using lm() and that will generate the error? Peter Ehlers -- dr. katharina manderscheid soziologisches seminar universität luzern kasernenplatz 3 6000 luzern 7 tel. ++41 41 228 4657 web: http://www.unilu.ch/deu/dr.-katharina

Re: [R] Problem with plotting diagnostics - Error in object$coefficients : $ operator is invalid for atomic vectors

2010-11-26 Thread Peter Ehlers
predictors; etc, until the problem appears. It's almost certain that the problem is not with R. Peter Ehlers thanks, katharina Von: Peter Ehlers [ehl...@ucalgary.ca] Gesendet: Donnerstag, 25. November 2010 21:54 An: Manderscheid Katharina Cc: 'r-help@r

Re: [R] extract p-value from an aov-oject

2010-11-26 Thread Peter Ehlers
] or summary(rt.aov)[[2]][[1]][1,Pr(F)] 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

Re: [R] how to get the plot like the attachment?

2010-11-26 Thread Peter Ehlers
and the origin is detached, but throgut pulling the window, I can get the one like fig_1. Now, I want to know how to use the code to obtain directly the formation in fig.1(orgin together)? Just use xaxs='i', yaxs='i' and xlim=c(3,8), ylim=c(3,8). Peter Ehlers thanks kevin

Re: [R] Plotting envelopes in spatstat

2010-11-26 Thread Peter Ehlers
) This can't be right - your parentheses don't match. And if you have your graphical parameters *inside* the envelope function, you certainly won't get what you want. I just tried the example on the help page for plot.envelope with main/xlab/legend settings and had no problem. Peter Ehlers But somehow

Re: [R] Priniting numerics

2010-11-27 Thread Peter Ehlers
numerical format. How can I get that? You'll need a greater penalty; see ?options. Peter Ehlers Thanks in advance. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] lattice: strange behavior (?) when using trellis.device(color=FALSE)

2010-11-27 Thread Peter Ehlers
:-( xyplot. - function(u) { xyplot(u[,2] ~ u[,1], par.settings = standard.theme(color=FALSE)) } see ?xyplot.ts Peter Ehlers Cheers, Marius On 2010-11-27, at 12:00 , ottorino wrote: Il giorno sab, 27/11/2010 alle 00.35 +0100, Marius Hofert ha scritto: The reason why I would

Re: [R] R Console - pasting into

2010-11-27 Thread Peter Ehlers
that it is probably not R but W XP. It's not likely to be R. How are you reading your pdf docs? Maybe you have some multiple clipboards software running that's confusing things. Peter Ehlers Cheers Troy __ R-help@r-project.org mailing list https

Re: [R] lattice: strange behavior (?) when using trellis.device(color=FALSE)

2010-11-27 Thread Peter Ehlers
= transparent), clip = list(panel = off (You have to modify the standard.theme parameters.) See ?modifyList and also: http://www.mail-archive.com/r-help@r-project.org/msg64699.html Peter Ehlers Cheers, Marius On 2010-11-27, at 13:16 , Peter Ehlers wrote: On 2010-11-27 03:31

Re: [R] unexpected behavior using round to 2 digits on randomly generated numbers

2010-11-28 Thread Peter Ehlers
across something that is known, or it is meant to behave this way, I couldn't find anything. Hmm, how hard have you looked? I doubt that I'll be the first to remind you to check the FAQ. Peter Ehlers Cory Rieth R.version() output: platform x86_64-apple-darwin9.8.0 arch x86_64 os

Re: [R] predict.drm not generating confidence intervals

2010-11-28 Thread Peter Ehlers
to predict and the second column contains the 'curveid', aka the grouping variable (if you have one). In your case, the grouping reduces to a single group, i.e. a vector of all '1's. This could all be made considerably clearer in the documentation. Peter Ehlers Brant Inman

Re: [R] How do I subtract sequential values ?

2010-11-28 Thread Peter Ehlers
, here's the next step: v - sample(50, 100, replace = TRUE) result - diff(v) / v[-length(v)] Peter Ehlers On Sun, Nov 28, 2010 at 7:29 PM, ericericst...@aol.com wrote: Just starting to learn R so excuse me if this is a simple question. I'm wondering how I get the percent difference

Re: [R] Replacing several rows of a matrix at once

2010-11-28 Thread Peter Ehlers
-major order, transpose first: ttmp - t(tmp) ttmp[, p] - vec (ans - t(ttmp)) Peter Ehlers TIA. Bryan * Bryan Hanson Professor of Chemistry Biochemistry DePauw University, Greencastle IN USA sessionInfo() R version 2.12.0 (2010-10-15) Platform: x86_64-apple-darwin9.8.0/x86_64

Re: [R] surpressing tickmarks / labels x-as for two sets of boxplot (plotted as stacked boxplots)

2010-11-29 Thread Peter Ehlers
(experiment1, experiment2), fill = c(red, green)) Does anyone know how I can surpress these labels for the second boxplot? Perhaps all you need is a bit more care in typing: naxt??? Peter Ehlers Thanks in advance, Karin __ R-help@r

Re: [R] data.frame and formula classes of aggregate

2010-11-29 Thread Peter Ehlers
. Here's how you can get the same result from both methods: 1. use na.action = na.pass in aggregate.formula; this will duplicate your x1 result. 2. use d - d[complete.cases(d), ] in your x1 calculation; this will duplicate your x2 result. Peter Ehlers thanks very much david freedman, atlanta

Re: [R] R equivalent of Beaton's Sweep algorithm

2010-11-29 Thread Peter Ehlers
/default/langref_sect266.htm and here for python http://adorio-research.org/wordpress/?p=262 Check swp() in pkg:ggm. 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

Re: [R] map() and pdf clipping

2010-11-30 Thread Peter Ehlers
to be something to do with the way rasterImage and pdf play together. But this works for me: insert the following line do.call(clip, as.list(par('usr'))) before your final map call. Peter Ehlers Thanks, Ben On Nov 29, 2010, at 2:03 PM, Ben Tupper wrote: Hello, Below is a function

Re: [R] xyplot : superimposed 2 groups in different panels

2010-11-30 Thread Peter Ehlers
this xyplot(bbb ~ aaa | ddd * fff) 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

Re: [R] Adding text to a multiplot (via mfrow)

2010-11-30 Thread Peter Ehlers
be really grateful if anyone could tell me if there is a simple method of achieving this. You probably want to look at ?mtext and especially its arguments 'outer', 'side', 'adj' and 'line'. But make sure that there's enough space in the margin with par(oma = c()). Peter Ehlers Many thanks Sam

Re: [R] rcauchy density distribution

2010-11-30 Thread Peter Ehlers
anything wrong, really. But do check range(x) Should be quite a range; that's what 'heavy tails' means. To see the fit, try this: hist(x, freq=FALSE, breaks=5000, xlim=c(-6,6)) curve(dcauchy(x), col = 2, add = TRUE) Peter Ehlers x- rchisq(1, df = 4) hist(x, freq = FALSE, breaks=100

Re: [R] How to draw a rect() behind a hist() ?

2010-11-30 Thread Peter Ehlers
, panel=function(...){ panel.rect(90,0,98,1000,col='bisque',border=NA) panel.histogram(...,col='transparent',lwd=2) } ) Again, you can define bar colours with a colour vector. Lattice is more customizable albeit a little harder to learn. Peter Ehlers Thanks, Jason

Re: [R] Calculating weibull's distribution mean, standard deviation, and variance

2010-07-12 Thread Peter Ehlers
Try fitdistr() in pkg MASS. -Peter Ehlers On 2010-07-12 11:17, Oscar Rodriguez wrote: Dear R community: Sorry if this question has a simple answer, but I am a new user of R. Do you know a command, or package that can estimate the weibull distribution's mean, standard deviation

Re: [R] levene.test

2010-07-14 Thread Peter Ehlers
611 2 84 473 You could consider using the Fligner-Killeen test in base R. See ?fligner.test. -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

Re: [R] send out put to file in R

2010-07-14 Thread Peter Ehlers
object; it's a list as class(compo) or reading the help page for decompose.graph would tell you. -Peter Ehlers Thanks chakri __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Query about wilcox.test() P-value

2010-07-14 Thread Peter Ehlers
. As to your example: there is no sense at all in doing a test on such data (other than to satisfy some hypothetical fanatical journal editor). -Peter Ehlers My version for R is 2.11.1 (2010-05-31) running on x86_64 GNU/Linux (RHEL). Thanks in advance for any help with this. Govind

Re: [R] levene.test

2010-07-14 Thread Peter Ehlers
your groups on. SPSS uses the mean, car uses the median. -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

Re: [R] Boxplot: Scale outliers

2010-07-14 Thread Peter Ehlers
to the boxes scaled with 0.1. Am I missing something? Maybe you're looking for the 'outcex' parameter? See ?bxp. -Peter Ehlers Thanks in advance! Robert __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] KLdiv question (data.frame)

2010-07-15 Thread Peter Ehlers
(), but be warned: any non-numeric columns will cause trouble. -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

Re: [R] Repeated analysis over groups / Splitting by group variable

2010-07-15 Thread Peter Ehlers
I would change that first dataOnly in by(...) or lapply(...) to dataOnly[,-3]. In fact, if the dataframe mydata is suitably subset, then, because of the as.matrix() in function(x), both the by() and lapply() methods will work fine with mydata. -Peter Ehlers On 2010-07-15 15:42, Phil Spector

Re: [R] Question about KLdiv and large datasets

2010-07-16 Thread Peter Ehlers
) KLdiv(mydata) KL seems to be not defined. Can somebody explain what is going on? Thanks, Ralf Ralf, You can adjust the 'eps=' argument. But I don't know what this will do to the reliability of the results. KLdiv(mydata, eps = 1e-7) -Peter Ehlers

Re: [R] invalid factor level, NAs generated

2010-07-16 Thread Peter Ehlers
invalid data in some of your files. Perhaps missing values coded as '*' or as 'N/A'. If so, set the na.strings= argument. -Peter Ehlers __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Identify points (was Plot error)

2010-07-17 Thread Peter Ehlers
and it would read out ben Check out HWidentify or HTKidentify in pkg:TeachingDemos. -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

Re: [R] slplot issue

2010-07-18 Thread Peter Ehlers
. And pcaMethods has slplot(). Please, folks, do tell us what packages you are using! [Now, I'm having trouble with the pemqzrsTawYY function; can anybody help? :)] -Peter Ehlers On 2010-07-17 16:32, Dennis Murphy wrote: In which package would one find slplot? It's not in any of the 1800+ packages on my

Re: [R] Identify points (was Plot error)

2010-07-18 Thread Peter Ehlers
You can always use the identify() function which will leave the id of the point on the plot; see ?identify. But you do eventually have to sort out your Mac problem. Sorry, I can't help with that. -Peter Ehlers On 2010-07-18 7:43, James Platt wrote: This is exactly what I want as I will have

Re: [R] Question about KLdiv and large datasets

2010-07-18 Thread Peter Ehlers
=' argument. But I don't know what this will do to the reliability of the results. KLdiv(mydata, eps = 1e-7) -Peter Ehlers __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Cramer-von Mises test

2010-07-18 Thread Peter Ehlers
'???') -Peter Ehlers Regards, Sean. __ 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

Re: [R] Cramer-von Mises test

2010-07-19 Thread Peter Ehlers
Don't thank me, thank the authors of sos (Spencer Graves, Sundar Dorai-Raj, and Romain Francois) and Jonathan Baron for hosting the search site. -Peter Ehlers On 2010-07-18 23:43, Sean Carmody wrote: Thanks Peter...I hadn't some across the sos package before, but I'm sure I'll be putting

Re: [R] slplot issue

2010-07-19 Thread Peter Ehlers
, ...){ panel.xyplot(x, y, ...) panel.text(x, y, labels = iris[,5], cex = 0.5) panel.abline(h = 0, v = 0) } ) -Peter Ehlers Thank you kindly, -- Shawn Way, PE MECO, Inc. (p) 281-276-7612 (f) 281-313

Re: [R] pcaMethods and Lattice help.

2010-07-19 Thread Peter Ehlers
dotplot(test) useful, as well. -Peter Ehlers Thank you kindly, -- Shawn Way, PE MECO, Inc. (p) 281-276-7612 (f) 281-313-0248 __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] par(uin) ?

2010-07-19 Thread Peter Ehlers
. Otherwise, I think you can make your inherited code work with something like Usr - par('usr') Pin - par('pin') dux - Usr[2] - Usr[1] duy - Usr[4] - Usr[3] uin - c(dux,duy)/Pin to replace uin - par(uin) But you'll also have to fiddle with atan() -Peter Ehlers On 2010-07-19 9:20, Michael Friendly

Re: [R] best way to apply a list of functions to a dataset ?

2010-07-21 Thread Peter Ehlers
) ) ddply(ma, .(variable), function(x) f(x, v = x[[value]])) # Another option is to use data.frame in place of summarise: # f - function(x,v) data.frame( mean = mean(v), sd = sd(v), skewness = skewness(v), mean.gt.med = mean.gt.med(v) ) # -Peter Ehlers On 2010-07-21

Re: [R] legend in R plot

2010-07-22 Thread Peter Ehlers
undesirable side effects, but I haven't given it much thought. I haven't had any problems with this version of legend(). -Peter Ehlers __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] how to force a table to be square?

2010-07-22 Thread Peter Ehlers
On 2010-07-22 10:43, Wu Gong wrote: Hi William, I'm curious about that you used d[]- lapply(d, factor... Could you please tell me if there are any differences between d[] and d? Thank you. Why not try it both ways and inspect the result. d[] - d - Obvious? -Peter Ehlers

Re: [R] t.test in for loop

2010-07-22 Thread Peter Ehlers
= data1, data2 = data2) lapply(L, t.test) -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

Re: [R] , how to express bar(zeta) in main title in boxplot

2010-07-22 Thread Peter Ehlers
(bquote(paste(.(a), : , bar(zeta), Boxplot from 2001 to 2009, sep = ))) It seems that setting main=... where ... contains bquote() works with plot(), but not with boxplot(). -Peter Ehlers __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] , how to express bar(zeta) in main title in boxplot

2010-07-22 Thread Peter Ehlers
On 2010-07-22 14:40, David Winsemius wrote: On Jul 22, 2010, at 4:24 PM, Peter Ehlers wrote: On 2010-07-22 11:44, Marcus Liu wrote: Hi everyone, I am plotting a boxplot with main title as main = bquote(paste(.(ts.ind[s]), : , bar(zeta), Boxplot from 2001 to 2009, sep = )) but it doesn't

Re: [R] , how to express bar(zeta) in main title in boxplot

2010-07-22 Thread Peter Ehlers
On 2010-07-22 15:21, David Winsemius wrote: On Jul 22, 2010, at 5:01 PM, Peter Ehlers wrote: On 2010-07-22 14:40, David Winsemius wrote: On Jul 22, 2010, at 4:24 PM, Peter Ehlers wrote: On 2010-07-22 11:44, Marcus Liu wrote: Hi everyone, I am plotting a boxplot with main title as main

Re: [R] re-ordering bwplot

2010-07-23 Thread Peter Ehlers
calling bwplot(). (BTW: is your : meant to be |?) -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

Re: [R] Error in rowSums

2010-08-12 Thread Peter Ehlers
Another suggestion: compare -1:4 with -(1:4) -Peter Ehlers On 2010-08-12 12:28, Amit Patel wrote: Hi I am trying to calculate the row sums of a matrix i have created The matrix ( FeaturePresenceMatrix) has been created by 1) Read csv 2) Removing unnecesarry data using [-1:4,] command

Re: [R] what does it mean when my main effect 'disappears' when using lme4?

2010-08-18 Thread Peter Ehlers
'DATA$labs' when using the data= argument? JJ I don't think that's expected behaviour, nor do I think that it occurs. There must be something else going on. Can you produce this with a small reproducible example? -Peter Ehlers On Wed, Aug 18, 2010 at 11:29 AM, David Winsemiusdwinsem

Re: [R] what does it mean when my main effect 'disappears' when using lme4?

2010-08-18 Thread Peter Ehlers
what gives and it may well be a design decision that I'm not aware of. I can't see anything in the help page that refers to this effect. -Peter Ehlers On Wed, Aug 18, 2010 at 5:52 PM, David Winsemiusdwinsem...@comcast.netwrote: On Aug 18, 2010, at 6:45 PM, Peter Ehlers wrote: On 2010-08-18

Re: [R] cbind

2010-08-21 Thread Peter Ehlers
or matrices. These can be given as named arguments. Surely, you checked? -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

Re: [R] Aspect Ratio

2010-08-23 Thread Peter Ehlers
to understand aspect ratio even better. Try this: x11(width = 10, height = 5) plot(X,Y,pch=+,col=blue,xlim=c(-2.5,2.5),ylim=c(-2.5,2.5)) (using Ted's X,Y) and compare with the 'asp' version. -Peter Ehlers On Aug 19, 2010, at 3:05 PM, (Ted Harding) wrote: Spencer, you came up with your example just

Re: [R] odd behavior of summary function

2010-08-24 Thread Peter Ehlers
(quantile) shows that there are quite a few ways to define quantiles and that R defaults to 'type=7'. -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

Re: [R] non-linear plot parameters

2010-08-27 Thread Peter Ehlers
SSweibull(Time + 0.01, ...). But a better way would be to use init - getInitial(Level~ SSweibull(Time,Asym,Drop,lrc,pwr)) (which will often give the converged values). You can follow up with fm - nls(Level ~ Asym-Drop*exp(-exp(lrc)*Time^pwr), start = init) -Peter Ehlers kc On Thu, Aug 26

Re: [R] non-linear plot parameters

2010-08-27 Thread Peter Ehlers
Just a small fix to my solution; inserted below. On 2010-08-27 3:51, Peter Ehlers wrote: On 2010-08-26 15:52, Marlin Keith Cox wrote: I agree. I typically do not use non-linear functions, so am seeing the art in describing functions of non-linear plots. One last thing. I tried to use a self

Re: [R] Making plots in big scatterplot matrix large enough to see

2010-09-02 Thread Peter Ehlers
it to look at potentially interesting parts. If I remember correctly, there's also the xysplom() function in pkg:HH. -Peter Ehlers __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Making plots in big scatterplot matrix large enough to see

2010-09-02 Thread Peter Ehlers
device. But even then, there's bound to be someone who'll want a pairs plot for 1000 variables. As usual with R, improvements are always welcome. You could submit appropriate code and, if it is deemed useful, I'm fairly sure that a better pairs() function will become part of Rx.xx.x. -Peter Ehlers

Re: [R] NLS equation self starting non linear

2010-09-02 Thread Peter Ehlers
it useful to add the curve you get with your start values to the scatterplot to see how reasonable the values are: plot(Joules~Days) curve(8 + 9 * exp(-.229 * x), add=TRUE) After you get a convergent solution, you can add a curve with the model values. -Peter Ehlers

Re: [R] 'seq' help page: seq_length - seq_len?

2010-09-03 Thread Peter Ehlers
function? Best, Niels Looks like that's fixed in R2.12.0. (It's always a good idea to check the development version.) -Peter Ehlers __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Saving/loading custom R scripts

2010-09-08 Thread Peter Ehlers
One comment on the function: I see that it uses T/F instead of TRUE/FALSE in a number of places. You'll save yourself some headaches if you replace those 'T/F's. -Peter Ehlers On 2010-09-08 1:25, DrCJones wrote: Hi, How does R automatically load functions so that they are available from

Re: [R] Correlation question

2010-09-09 Thread Peter Ehlers
your version of R produces different results from mine. I don't know if I should open a bug report. It would be good if someone You're doing the right thing by asking here first before reporting. It would definitely not be a good idea to report a (non-)bug in an outdated version of R. -Peter

Re: [R] scalable delimiters in plotmath

2010-09-11 Thread Peter Ehlers
a matter of taste, but I would use \341 and \361. However, these are still not scalable, AFAICS. -Peter Ehlers On Sat, Sep 11, 2010 at 10:01 AM, baptiste auguie baptiste.aug...@googlemail.com wrote: What do people use to show angle bracketsin R graphics? Have I missed something obvious

Re: [R] Problem with all.equal and POSIXt.

2010-09-12 Thread Peter Ehlers
message or to coerce to POSIXct. Note that all.equal(as.POSIXct(x), as.POSIXct(x)) yields TRUE, as does using as.Date(x). -Peter Ehlers My system: R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3

Re: [R] Plot with Group # as pch

2010-09-13 Thread Peter Ehlers
. Is there a way that the above line could be modified so that it would use the group 3 itself, rather than the corresponding charecter? Wrap your pch values in as.character(). -Peter Ehlers thanks again, k On Mon, Sep 13, 2010 at 5:00 PM, David Winsemiusdwinsem...@comcast.netwrote: On Sep

Re: [R] xyplot legends

2010-09-14 Thread Peter Ehlers
=' argument to key(): key(divide = 1, etc) See the 'key' section in ?xyplot. -Peter Ehlers Thanks very much! John - Original Message From: David Winsemiusdwinsem...@comcast.net To: array chiparrayprof...@yahoo.com Cc: r-help@r-project.org Sent: Mon, September 13, 2010 4:05:04

Re: [R] labeling outliers with subject numberss

2010-09-15 Thread Peter Ehlers
(which.max(score -Peter Ehlers On Wed, 15 Sep 2010, Kevin Burnham wrote: How can I get the outlier in this boxplot of Score to be represented by the corresponding value in SubNo? score=c(6,6,7,14,5,7,6,8) SubNo=1:8 mydata=data.frame(SubNo, score) boxplot(mydata$score) Thanks! Kevin

Re: [R] Nemenyi test as a post-hoc test to Kruskal Wallis

2010-09-16 Thread Peter Ehlers
for me. As to trafo and contrMat, try this: ?trafo ## in pkg:coin ?contrMat ## in pkg:multcomp -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

Re: [R] feedback/question on function update()

2010-09-18 Thread Peter Ehlers
(~ . + .(x))) print(fo) } (using update.formula() as illustration) -Peter Ehlers On Sat, Sep 18, 2010 at 9:30 AM, Benjamin Godlovebgodl...@oberlin.edu wrote: Hi, First let me say I am a big fan of R and appreciate all your time and effort. The update() function does not seem to work

Re: [R] adding variable to netCDF file

2010-09-18 Thread Peter Ehlers
('testfile.nc',write=TRUE) t - ncobj$dim[['t']] c - var.def.ncdf('c','hrs',t,missval=-999) ncobj - var.add.ncdf(ncobj,c) close(ncobj) tmp - open.ncdf('testfile.nc',write=TRUE) put.var.ncdf(tmp,c,c(.1,.2,.3,.4,.5)) close(tmp) -Peter Ehlers __ R

Re: [R] Problem with list

2010-09-19 Thread Peter Ehlers
getting error: chol(dat['A1']) Error in chol.default(dat[A1]) : non-numeric argument to 'chol' Can somebody point me where I am doing wrong? You need another set of brackets: chol(dat[['A1']]) -Peter Ehlers __ R-help@r-project.org mailing list

Re: [R] removed data is still there!

2010-09-23 Thread Peter Ehlers
On 2010-09-21 5:51, Nikhil Kaza wrote: example(factor) iris1$Species- factor(iris1$Species, drop=T) will get you what you need. Hmm, doesn't work for me. ?factor does not list a 'drop=' argument. -Peter Ehlers Nikhil Kaza Asst. Professor, City and Regional Planning University of North

Re: [R] how to make point character thicker in the legend of xyplot?

2010-09-23 Thread Peter Ehlers
=c(0,0),type='p', points=list(col=1:2,pch=0:1,cex=2,lwd=2), text=list(lab=c('A','B'),cex=1.5,font=2))) Any suggestions? You can add this line to your xyplot call: par.settings = list(grid.pars = list(lwd = 2)), -Peter Ehlers Thanks John - Original Message From: array

Re: [R] how to make point character thicker in the legend of xyplot?

2010-09-23 Thread Peter Ehlers
with setting lex=2, but that would thicken all lines including the axes and tick marks. I'm not sure that my advice was the best; it's just what occured to me at the moment. Perhaps Deepayan will weigh in with the definitive solution. -Peter Ehlers - Original Message From: Peter Ehlersehl

Re: [R] labels in (box)plot

2010-09-25 Thread Peter Ehlers
=TRUE, axes=FALSE) box(); axis(1) axis(2, at=1:4, lab=NA) mtext(levels(df$SPECSHOR), side=2, at=1:4, line=1, cex=0.8) -Peter Ehlers __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] margin control in lattice package

2010-09-25 Thread Peter Ehlers
. -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.

Re: [R] Changing x-axis on boxplot

2010-09-26 Thread Peter Ehlers
, vertical = TRUE, at = 1:3 + 0.1, axes = FALSE, pch = 21, bg = orange, cex = 1.5) axis(1, at = 1:3, labels = c(0.5, 1, 2)) axis(2) box() legend(2, 9, c(Ascorbic acid, Orange juice), pch = 21, pt.bg = c(yellow, orange), pt.cex = 1.5) -Peter Ehlers On 2010-09-26 4:48

Re: [R] bwplot superpose panel.points from another dataframe

2010-09-27 Thread Peter Ehlers
augment the data frame appropriately instead. -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

Re: [R] move colorkey

2010-09-29 Thread Peter Ehlers
(key.right = 0.8)) You might then have to adjust the space on the right with par.settings = list(layout.widths = list(key.right = 0.8, right.padding = 2)) -Peter Ehlers __ R-help@r-project.org mailing list

  1   2   3   4   5   6   7   8   9   10   >