Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread S Ellison
Enrico R. Crema enryu_cr...@yahoo.it 28/10/2010 12:08:55 Well...thanks to everybody for suggestions and reading...I guess I have to study more! ... On 28/10/10 12:23, Enrico R. Crema wrote: I can't provide you a link for more details, The canonical link is R FAQ 7.31 in the

Re: [R] Plotting 2 Lines on the Same Chart

2010-11-10 Thread S Ellison
When I use Plot(series1) lines(series2) The graph will use the y axis scaling for series 1 so some of series 2 is cut off. How do I control the y axis scaling? Plot them together as a multivariate series as in the examples already pointed to. ...or try plot(series1, type=l,

Re: [R] boxplot: reverse y-axis order

2010-11-22 Thread S Ellison
A simple alternative is to use at to contrl plot locations: boxplot( ..., at=rev(1:nlevels(depthM))) which just rearranges where they are plotted. Example: set.seed(1023) x - gl(5, 5) y-rnorm(25) boxplot(y~x, horizontal=TRUE) boxplot(y~x, at=rev(1:nlevels(x)), , horizontal=TRUE) Steve E

Re: [R] Filled contour plot showing labeled isolines?

2010-11-25 Thread S Ellison
If you usre filled.contour, then use contour() as a part of the function supplied as the axis parameter, you can correctly overlay contours on the colour contour plot. Steve e -Original Message- From: Fiona Berryman f.berry...@wlv.ac.uk To: r-help@r-project.org Sent: 11/25/2010

Re: [R] levene.test - spelling

2010-07-19 Thread S Ellison
John Fox j...@mcmaster.ca 14/07/2010 15:49:21 the development version of the car package on R-Forge, which can be installed via install.packages(car, repos=http://R-Forge.R-project.org; (and which has an argument named center, not location). Would you consider a plaintive request to

Re: [R] Why do the results of paste() depend on how the argument (data.frame) is constructed?

2010-08-02 Thread S Ellison
At the risk of repeating a post I haven't read, the two constructs are different because 1:3 returns a vector of integers (class integer) and c(1, 2, 3) is a bit more conservative about what '1' and the like mean and returns a vector of class numeric. lapply(df1, class) lapply(df2, class) On

Re: [R] m-estimators

2010-08-09 Thread S Ellison
check the robustbase package and rlm or hubers in MASS You'll need to know which m-estimator you want, but both those packages include at least some m-estimators. Strictly, so does the base package; the mean is an m-estimator. Just not a very robust one! S Ellison Iasonas Lamprianou lampria

Re: [R] Function to Define a Function

2010-08-10 Thread S Ellison
Neat. But why assign the functions to separate variables at all? mdlChooser - function(type=c(one,two)) { type - match.arg(type) m - switch(type, one=function(x,N0,r) N0*exp(x*r) , two=function(x,N0,r,K) (N0*K)/(N0+(K-N0)*exp(-x*r)) ) m } also works without appearing to assign

Re: [R] Plotting confidence bands around regression line

2010-08-11 Thread S Ellison
Frank Harrell f.harr...@vanderbilt.edu 11/08/2010 17:02:03 This problem seems to cry out for one of the many available robust regression methods in R. Not sure that would be much more appropriate, although it would _appear_ to work. The PB method is a sort of nonparametric/robust approach

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-23 Thread S Ellison
I use savePlot() with type=emf (remember to include the right file extension - although savePlot will use the type as default extension, it will only do so if there are no '.'s in the filename, so filenames like '../plots/aplot' won't get the extension automatically. Really should have made that

Re: [R] Find classes for each column of a data.frame

2010-08-26 Thread S Ellison
try lapply(df, class) Steve E On Thu, Aug 26, 2010 at 4:31 PM, Daniel Brewer daniel.bre...@icr.ac.uk wrote: Hello, Is there a simple way to get the class type for each column of a data.frame? I am in the situation where I would like to get all the columns of a data.frame that are factors.

Re: [R] lme vs. lmer, how do they differ?

2010-09-10 Thread S Ellison
John Sorkin jsor...@grecc.umaryland.edu 10/09/2010 13:21:09 What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects regression analyses. From a user's point of view: - lme only accepts nested random effect; lmer handles crossed random effects - lme has

Re: [R] What's the meaning of Species ~ . in IRIS data

2010-09-30 Thread S Ellison
See ?lm and, more usefully, ?formula Gundala Viswanath gunda...@gmail.com 29/09/2010 15:51 I am refering to a function call like this: data(iris) x - svmlight(Species ~ ., data = iris) I tried to see the content of it by typing: Species ~ . but it gives nothing. How can I see it's

Re: [R] axis labels

2009-10-13 Thread S Ellison
They probably look different because the y-axis distance is to the bottom of the number and the x-axis to the top; character adjustment is putting the actual locations in the 'same' place but with opposing orientation. Try fooling about with the mgp argument in axis(): par(mfrow=c(1,1), cex.axis

Re: [R] Antropometrics with R

2009-10-28 Thread S Ellison
The gamlss package, by Mikis Stasinopoulos and available at http://www.gamlss.com/ as well as from CRAN, is also very flexible, allowing shape and scale adjustment. Steve E David Winsemius dwinsem...@comcast.net 28/10/2009 14:18 You might want to take a look at this article by WEI, PERE,

Re: [R] superscript in ylab

2009-10-28 Thread S Ellison
Lathouri, Maria m.lathour...@imperial.ac.uk 10/28/09 6:02 PM I want to have as label in y-axis Temperature (oC). First, look at ?plotmath and find the 'degree' symbol... Then look at the symbol for spacing. Then try ylab=expression(Temperature~degree*C)

Re: [R] Find the three best values in every row

2010-05-07 Thread S Ellison
Hmm... set.seed(17*11) d-data.frame(africa=sample(50, 10), europe= sample(50, 10), n.america= sample(50, 10), s.america= sample(50, 10), antarctica= sample((1:50)/20, 10) ) #Get three top from each row

Re: [R] A primitive OO in R -- where next?

2010-05-13 Thread S Ellison
R OO is documented for S3 classes under section 5 (Object-oriented programming) in the R language definition. I guess the issue is somewhat philosophial as to how you use it. R philosophy _mostly_ separates data from operations on data, so the OO model provides classes for data and essentially

Re: [R] What does this warning mean: DLL attempted to change FPU control word from 8001f to 9001f

2010-05-17 Thread S Ellison
There's a note on this issue at http://www.nag.co.uk/numeric/RunderWindows.asp which claims it can 'safely be ignored'. Your mileage may vary, I presume. I had the same error message under a previous version (but with a different library and during installation, not loading, some packages)

Re: [R] plotting the following data

2010-05-21 Thread S Ellison
plot(1:8, f, axes=FALSE) axis(1, at=1:8, labels=time) axis(2) ANJAN PURKAYASTHA anjan.purkayas...@gmail.com 21/05/2010 17:15:48 Hi, I need to plot $time on the x-axis and $f on the y-axis for the following data: timef 0h0.00 0.5h0.54 1h1.15 2h2.33 4h1.57 6h2.19 18h

[R] Getting Rd pages right for redefined S3 generic

2009-12-17 Thread S Ellison
I'm writing a package, and would appreciate advice on controlling the help documentation cross-references for a redefined generic. I wanted to define a cbind equivalent for an object that mostly behaves like a data frame. base::cbind dispatches to a data frame method if _any_ parameter is a data

Re: [R] Which hist cell each value falls in?

2009-12-21 Thread S Ellison
cut() might work if you want a character version... set.seed(221) x-rnorm(50) y-rnorm(1) xh-hist(x) cut(y, breaks=xh$breaks) #or as.character(cut(y, breaks=xh$breaks)) #or for a 'level number' version (a bit like which()) as.numeric(cut(y, breaks=xh$breaks)) Jim Lemon j...@bitwrit.com.au

Re: [R] What is .Machine$double.eps?

2009-12-24 Thread S Ellison
See ?.Machine Saji Ren saji@gmail.com 24/12/2009 06:07:27 Hello,everyone: I met this notation when I read the original code of function quantile.There is one sentence as below: eps - 100 * .Machine$double.eps when I input .Machine$double.eps in R, it returns [1] 2.220446e-16. Can anyone

Re: [R] Identifying outliers in non-normally distributed data

2010-01-01 Thread S Ellison
If you're interested in handling outliers in analytical proficiency testing read current and past IUPAC guidance on PT (see http://www.iupac.org/objID/Article/pac7801x0145) and particularly references 1, 4, 5, and 11 therein, for starters. Although one might reasonably ask whether outliers are

Re: [R] ordinal variables

2010-06-03 Thread S Ellison
If you set them a problem that has them doing the same sort of thing five times and compare the time it takes with code pasted from an editor (eg Tinn-R) and the time it takes via menius, you may have more luck convincing them. A command line sequence is harder than menus the first two times but

Re: [R] Greek letters and formatted text

2010-06-07 Thread S Ellison
The ?plotmath page and the example ## How to combine math and numeric variables : should be helpful...? Thomas Bschorr bsch...@phys.ethz.ch 05/06/2010 10:36:42 Hi, I desperately try to do s.th. like m=1.23455 sig=0.84321 plot(1,1) text(0.8,1,sprintf(Sigma=%1.2f±%1.2f,m,sig)) where

Re: [R] Some questions about R's modelling algebra

2010-07-02 Thread S Ellison
Hadley Wickham had...@rice.edu 02/07/2010 14:59:53 Where is %in% documented within R? I'm pretty sure it's a different action to ?%in%, and it's not mentioned in ?formula ?formula in R 2.9.2 says in para 2: The %in% operator indicates that the terms on its left are nested within those on

Re: [R] getting p values

2010-01-13 Thread S Ellison
Duncan Murdoch murd...@stats.uwo.ca 12/01/2010 18:07:46 I need to get the p values for a table with 15000 entries of t values. ... Put the t values into a vector, then use pt() in an appropriate way ... and don't forget any necessary correction for multiple comparisons; see ?p.adjust

Re: [R] Barchart bar lengths not proportionate

2010-01-14 Thread S Ellison
I think you should rather look at the origin= parameter in barchart. See ?panel.barchart for a discussion of this exact problem: origin: the origin for the bars. For grouped displays with 'stack = TRUE', this argument is ignored and the origin set to 0. Otherwise, defaults

Re: [R] advice/opinion on - vs = in teaching R

2010-01-18 Thread S Ellison
Thomas Lumley tlum...@u.washington.edu 15/01/2010 16:07 Which should I use or does it matter, please? I would say to use = if you are teaching people familiar with C or Java, and to use - otherwise. Nothing like an option to induce polarisation! '=' is used in at least two contexts in R,

Re: [R] Error with toString

2010-01-26 Thread S Ellison
name toString(20) is from Excel or OpenOffice; means 'logical and' in R, not string concatenation. paste() is simpler; sprintf() is more precise as to decimal places and format. anna lippelann...@hotmail.com 26/01/2010 14:09:15 Hello there, I want to create a string from strings and

Re: [R] 'R' and 'Yield to Maturity'

2010-02-01 Thread S Ellison
If you know the likely range, uniroot would do it. f.ytm-function(ytm) 100 / (1+ytm) +100 / ((1+ytm)^2) + 1100 / ((1 + ytm)^3) -1010 uniroot(f.ytm, interval=c(0,25)) #$root has the answer Craig P. Pyrame crap...@gmail.com 01/02/2010 10:19 Madhavi Bhave wrote: Dear R helpers I am

Re: [R] Problem accessing help files

2010-02-04 Thread S Ellison
Might this be a firewall-like issue and nothing to do with html or R? If I understand the 2.10 help system, it operates by starting R as an http server - effectively a web server, operating on the local machine (127.0.0.1) with an unusual IP port (which doesn;t seem to be consistent from one run

Re: [R] Extract p-value from lm for the whole model

2010-02-05 Thread S Ellison
I would like to ask how to extract the p-value for the whole model from summary(lm). If you mean the p-value given at the end of the summary() printout, it isn;t held in the summary object. But information to get it is. Using the ?lm example: ctl -

Re: [R] Physically open Excel file from R

2010-02-08 Thread S Ellison
Try shell('\file.xls\') where 'file.xls' is the excel filename. The escaped quotes (\) are not strictly necessary if the filename contains no spaces, but they are essential if it does. Sergey Goriatchev serg...@gmail.com 08/02/2010 12:48:20 Hello, everyone I wonder if it is possible to

Re: [R] Memory Problem

2010-02-08 Thread S Ellison
jim holtman jholt...@gmail.com 08/02/2010 14:09:52 Typically R does not have macros; I know exactly why Jim Holtman said that; R doesn't have a separate 'macro' construct with separate 'macro variables'. But it is perhaps a bit misleading to say that R doesn't have macros without saying a bit

Re: [R] data frames; matching/merging

2010-02-08 Thread S Ellison
You could try aggregate: If we call your data frame df: aggregate(df[2], by=df[1], FUN=min) will get you what you asked for (if not necessarily what you need ;-) ) Switching the columns around is easy enough if you need to; proceeding stepwise: df.new-aggregate(df[2], by=df[1], FUN=min)

Re: [R] retrieve from function

2010-02-19 Thread S Ellison
Try f - function(nbr){ y-rnorm(nbr) y1 - mean(y) plot(y) invisible( y1) } That will return y1 invisibly, so f(100) plots but returns nothing visible but w-f(100) plots and places the return value in w Dennis Murphy djmu...@gmail.com 02/19/10 9:33 PM Hi: Perhaps you want

Re: [R] deleting column from data frame

2010-02-23 Thread S Ellison
test$Y-NULL test[Z]-NULL Todd Ogden to...@columbia.edu 23/02/2010 16:02:01 There might be more elegant ways, but this will do it: test-test[-match(Y,names(test))] On Feb 23, 2010, at 7:04 AM, Knut Krueger wrote: Hi to all, test - data.frame(X=c(1:4),Y=c(5:8),Z=c(8:11)) test - test[,-2]

Re: [R] replace NA value with 0

2007-09-14 Thread S Ellison
Ted Harding [EMAIL PROTECTED] 14/09/2007 10:59:47 On the contrary! It adds to our collective wisdom. We all have to suck eggs, and usually can successfully perform the act. Ted, Thanks for the kind remarks. But we'll have to get off the egg topic, or we'll all end up as acknowledged

Re: [R] Expressing number in percentage

2007-09-28 Thread S Ellison
Sorry! paste(x*100,%) Marc Schwartz [EMAIL PROTECTED] 27/09/2007 15:56:05 On Thu, 2007-09-27 at 14:36 +0100, stat stat wrote: I am wondering if there is any procedure to write a particular value in Percentage format, still maintaining it's numeric character. for example I want to write

Re: [R] Password-protect script files

2007-09-28 Thread S Ellison
Is there any way to password-protect script files (either within R or otherwise)? The question seemed to me to be more about password protection against modification, rather than encryption. I'd have thought this was something a decent OS could take care of. It seems as daft to try to get a

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-18 Thread S Ellison
I think there is reason to be surprised, I am, too. ... What am I missing? Read the formula and ?summary.lm more closely. The denominator, Sum((y[i]- y*)^2) is very large if the mean value of y is substantially nonzero and y* set to 0 as the calculation implies for a forced zero intercept. In

Re: [R] Multivariate integration with infinite limits

2007-11-10 Thread S Ellison
Ermmm... from ?integrate Description: Adaptive quadrature of functions of one variable over a finite or infinite interval. R maps infinite intervals to a finite interval before numerical integration, provided that you tell it that the limits are infinite. Using integrate() over

Re: [R] R - lme

2007-11-13 Thread S Ellison
Divaker, Thanks for the data. For me, summary(aov(Purity~Supplier/Batch, process)) gives exactly the same results for mean squares as aov(Purity~Supplier+Error(Supplier/Batch), process) except that the latter gives no p-values (because Supplier appears as both error term and fixed effect,

Re: [R] Manipulating the ... args.

2008-02-01 Thread S Ellison
I'm no guru, but can you not use do.call here? i.e. does foo-function(...) #Not x(...) { arglist-list(...) #remove bad characters from arglist here. # then do.call(bar,arglist) } do what you want? David Keegan [EMAIL PROTECTED] 01/02/2008 11:00:15 Hi, foo-x(...) { # Need

Re: [R] Using R in a university course: dealing with proposal comments

2008-02-12 Thread S Ellison
Stas Kolenikov [EMAIL PROTECTED] 11/02/2008 18:54 I would think the FDA regulations could go as far as specific SAS syntax, or at least to specify SAS PROCs to be used. This is unnecessary caution. FDA (like the MHRA in the UK, where I come from) should not endorse a single supplier, even

Re: [R] mixed model nested ANOVA (part two)

2008-02-24 Thread S Ellison
Also i have read in Quinn and Keough 2002, design and analysis of experiments for biologists, that a variance component analysis should only be conducted after a rejection of the null hypothesis of no variance at that level. Hmmm... This does rather assume that 'no significant result' means

Re: [R] Plot contour over filled contour

2008-03-14 Thread S Ellison
Devred, Emmanuel [EMAIL PROTECTED] 13/03/2008 18:08:45 Dear R-users, I haven't found a way in the searchable archive to overplot a contour (lines) over a surface. I got round this by using the plot.axis parameter, which accepts a set of plotting commands and isn't fussy about what. Since

Re: [R] graph: axis label font

2009-07-14 Thread S Ellison
R on windows includes some useful functions for windows font handling. Start with ?windowsFonts windowsFonts() should show Arial mapped to sans. (Arial is the default in Windows, at least in my locale; ?windows tells you that too) Then try par(family=sans, font=2) #specifies Arial bold as

Re: [R] predictive punishment module (was: Re: Simple cat statement - output truncated)

2009-07-15 Thread S Ellison
Duncan Murdoch murd...@stats.uwo.ca 15/07/2009 15:04:29 * R has a new predictive punishment module. It punishes you for things it knows you will do later. Dang! Does that mean it'll return errors for the statistical idiocy I haven't yet got around to committing? ;-) Steve E

Re: [R] Axes origins and labeling

2009-07-15 Thread S Ellison
Since you;re already specifying the axis tick locations for the x-axis any ylim for y, one way of dealing with it is to give the axes an extra tick at each end: Instead of axis(side=1, at=c(1,2,3,4), labels=gut) use axis(side=1, at=0:5, labels=gut) Similarly for axis(2), use axis(2,

Re: [R] moving columns on a stripchart closer together

2009-07-21 Thread S Ellison
I agree; the stripchart defaults place things too close to the edges for 'neat' layout. Use at= coupled with ylim (or xlim, if vertical) to place the rows explicitly and leave room at the margins. Extending the last example in ?stripchart: stripchart(decrease ~ treatment, main =

Re: [R] list of lm() results

2009-07-21 Thread S Ellison
You could look at ?lmList in package lme ... Idgarad idga...@gmail.com 21/07/2009 17:27:52 How can I get the results of lm() into a list so I can loop through the results? e.g. myResults[1] - lm(...) myResults[2] - lm(...) myResults[3] - lm(...) ... myResults[15] - lm(...) myResults[16] -

Re: [R] Adjusting x/y text labels for a bwplot using cex.lab

2009-07-21 Thread S Ellison
You probably missed the bit in the lattice documentation which says that few if any of the standard par() parameters work on lattice. lattice uses its own system. Look at the xyplot help page and seek out the scales argument. That tells you that scales is a list, optionally with x and y

Re: [R] [Rd] How to create a permanent dataset in R.

2009-07-24 Thread S Ellison
Liviu Andronic landronim...@gmail.com 07/24/09 7:06 PM .. use save.image() to save R's workspace and re-load it when re-opening R via load(). Or you could just use save.image in your default directory for R and R will then open it automatically. I'd use that sparingly though; it is not always

Re: [R] boxplot with average instead of median

2008-08-05 Thread S Ellison
boxplot itself is hardwired to produce the boxplot.stats list, and that is not easy to change. To get a different set of stats, you would need to do things in rwo stages: i) create a boxplot object of the type returned by boxplot, but using your own stats ii) call bxp on that object. That's kind

Re: [R] 95% CI bands on a Lowess smoother

2008-08-05 Thread S Ellison
If you use loess instead of lowess, you can get standard errors and hence approximate confidence bands by using predict. Example: plot(cars) plx-predict(loess(dist~speed, data=cars), se=T) lines(cars$speed,plx$fit) lines(cars$speed,plx$fit+2*plx$s, lty=2) #rough ready CI

Re: [R] RPro

2008-08-10 Thread S Ellison
Stephan Kolassa [EMAIL PROTECTED] 08/10/08 8:41 PM I like RSeek: http://www.rseek.org/ The burning question is why an audio compay would be running a web search engine for an open source statistics package...??! *** This email and

Re: [R] dixon test

2008-08-13 Thread S Ellison
giov [EMAIL PROTECTED] 13/08/2008 10:59:32 just a question...I don't know what is the distribution of my data (normal, T, etc...). So, how can I set the type parameter? You must assume an underlying distribution or you can't do an outlier test. Outliers are just unusually extreme data

Re: [R] ignoring zeros or converting to NA

2008-08-13 Thread S Ellison
The help page on binary operators (see ?==) confirms that binary representation of fractional representation is not catered for and points to all.equal as a more suitable test method for those cases. Steve E Thomas Lumley [EMAIL PROTECTED] 13/08/2008 16:47 Integers (up to a fairly high limit)

Re: [R] dixon test

2008-08-14 Thread S Ellison
giov, It sounds like you have approximately symmetric distributions. If that is so, and particularly if the standard deviation is less than about 20% of the mean, I'll stick my neck out and say I would assume underlying normality for outlier testing purposes unless there's a reason to do

Re: [R] Exponential smoothing?

2008-08-19 Thread S Ellison
An r hel search picks up http://tolstoy.newcastle.edu.au/R/help/01a/1162.html from 2001, which points towards the ts package. Öhagen Patrik [EMAIL PROTECTED] 19/08/2008 09:00:12 Dear List, I have used all my resources (i.e. help.search) and I still havn't been able to figure out if there

Re: [R] Conversion - lowercase to Uppercase letters

2008-08-20 Thread S Ellison
see ?gsub and loook at the last examle suman Duvvuru [EMAIL PROTECTED] 20/08/2008 05:19 I would like to know how to convert a string with characters to all uppercase or all lowercase? If anyone could let me know if there exists a function in R for the conversion, that will be very helpful.

Re: [R] savePlot() does not save plot with format set

2008-08-26 Thread S Ellison
Strictly, you need to type the extension _if your filename or path include a period (.)_ but not otherwise. The filename test alone will be saved as paste(test,type). So will, for example, /plots/test. But filenames such as test.it or ../plots/test will not include the extension automatically.

Re: [R] Two envelopes problem

2008-08-26 Thread S Ellison
Duncan Murdoch [EMAIL PROTECTED] 26/08/2008 16:17:34 If this is indeed the case, switch; the expected gain is positive because _you already have the information that you hold the median value of the three possibilities_. The tendency when presented with the problem is to reason as if this is

Re: [R] boxplot - label outliers

2008-09-03 Thread S Ellison
Sherri; The boxplot stats include outlier values in $out and their group number in $group. Let me assume that you want to put the boxes at integer positions on the x-axis (the default is the same). The we have y-rnorm(60) g-gl(3,20) labels=paste(Value, 1:length(y)) bx-boxplot(y~g) bx.at-1:3

Re: [R] how to write symbol (nabla) in R graph

2008-06-19 Thread S Ellison
You can use the 'symbol' element in an expression. For example plot(1:5) text(2,3,expression(symbol(\xD1))) S. Nuno Prista [EMAIL PROTECTED] 06/19/08 9:55 PM Dear colleagues, Can anyone of you tell me how to write a nabla symbol in an R graph? Thanks in advance, Nuno

Re: [R] Need ideas on how to show spikes in my data and how to code it in R

2008-07-08 Thread S Ellison
Two thoughts: i) If you have a narrow distribution, the density can be higher than 1. The area comes out at 1 for density, and n for the frequency. ii) hist() will not show the same frequencies as density() unless hist has unit bin sizes. density*length is showing number per unit change in

Re: [R] How to change labels in a histogram

2008-07-08 Thread S Ellison
Lord Yo [EMAIL PROTECTED] 07/08/08 9:00 AM I am trying to add a percent sign to my labels in a hist() plot. ?hist says labels: logical or character. This should be a clue; labels could be a character vector. Try x-rlnorm(128, 1) h-hist(x, plot=F) plot(h,

Re: [R] simple random number generation

2008-07-24 Thread S Ellison
Since the standard normal distribution goes to infinity in both directions, you can't have random normal constrained to +-1.5. You can have _truncated_ standard normal, though, if that's really what you want. +-1.5 is/are the normal quantiles at pnorm(c(-1.5,1.5)). So if we generate 500

Re: [R] Plotting ordered nominal data

2008-08-01 Thread S Ellison
Sandy, You can re-order a factor with df$Eyeball-factor(df$Eyeball, levels=c(Normal, Mild, Moderate, Severe), ordered=T) (assuming df is your data frame and that you want an _ordered_ factor; the latter is not essential to your plots) Incidentally, NULL isn't a particularly friendly item to

Re: [R] Fractional Factorial Design

2008-04-28 Thread S Ellison
Paul; You asked using ... optFederov(~.,dat,6) ... does the job with good efficiency. I would be interested to know what your objection to this is S I have no issue with AlgDesign in principle, but the question was specifically about _fractional_ factorials, so I answered that. As to

Re: [R] missing values in document

2008-04-30 Thread S Ellison
What exactly is on line 1743? Genuinely empty cells will probably read as NA anyway. Excel errors, prefixed # in excel, will be read as comment markers and cause the remainder of the line to be ignored. This often causes this kind of error. Steve E Monna Nygård [EMAIL PROTECTED] 30/04/2008

Re: [R] ordering a factor in boxplot output

2008-05-01 Thread S Ellison
The factor order defaults to alphabetical, and boxplot follows that. Re-ordering the factor to the order of interest is probably the best way of handling it. However, if you don;t want to do that, you could perhaps also use the at= parameter in boxplot. For example x-rnorm(50)

Re: [R] envelope line from a cloud of points

2008-05-05 Thread S Ellison
See ?chull juli pausas [EMAIL PROTECTED] 05/05/08 1:56 PM Hi, Is there a way in R to plot an envelope line from a cloud of points (x, y data) ? That is, a smooth line that include all points, where the points do not follow a strait linear pattern. Could somebody redirect me to some package or

Re: [R] Regarding anova result

2008-05-09 Thread S Ellison
Guru S [EMAIL PROTECTED] 09/05/2008 08:18 I fitted tree growth data with Chapman-Richards growth function using nls. When I try to run the anova() function I get this: Error in anova.nls(fit.nls) : anova is only defined for sequences of nls objects There seem to be two problems. The first is

Re: [R] Advise in R- plotting graphs

2008-05-24 Thread S Ellison
Jason Lee-14 wrote: I want to plot V1 against V2 with the condition that I want to mark(color) the point(row 5) on the graph. This is so i could see some triangle shape thing on the graph for row 5. You could try something crude like plot(V1,V2, col=ifelse( (1:length(V1)) == 5,

Re: [R] In fact this is a Stats question, but...

2008-05-29 Thread S Ellison
The low R2 says the model does not explain much of the variance. But the high significance arises from the very large number of degrees of freedom. This is not an 'incompatibility'; just what happens with large dispersion, small effects and a very large number of observations. But you clearly

Re: [R] Rpart and case weights: working with functions

2008-06-03 Thread S Ellison
A bit of fiddling suggests that the problem is less to do with rpart (which will quite happily acept weights defined inside a function) and more to do with the formula argument to the test function. This is probably because defining the formula in the global environment (as you implicitly do by

Re: [R] bartlett.test()

2008-06-05 Thread S Ellison
Birgitle [EMAIL PROTECTED] 05/06/2008 10:33:20 I think you should specify your grouping factor: Yes, the message says the grouping factor is missing. But xx should not be a matrix. Your x data should be in a (1-dimensional) vector of length 276, and so should your grouping factor. Toy

Re: [R] histogram tick labels

2008-06-09 Thread S Ellison
Lawrence, use hist(..., axes=F) then put your own axis on with axis(1,...) Example: y-rnorm(200) hist(y,axes=F) axis(2) axis(1, at=seq(-3,3,1)) Steve E Lawrence Hanser [EMAIL PROTECTED] 06/09/08 7:02 AM Dear Friends, I am doing a rather simple histogram on a vector of data, MR. I set breaks

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread S Ellison
? How one cand do this in R? Many thanks --- S Ellison s.elli...@lgc.co.uk schrieb am Di, 28.4.2009: Von: S Ellison s.elli...@lgc.co.uk Betreff: Re: [R] duplicate 'row.names' are not allowed An: r-h...@stat.math.ethz.ch, amor Gandhi amorigan...@yahoo.de Datum: Dienstag, 28. April 2009, 14:17

Re: [R] duplicate 'row.names' are not allowed

2009-04-28 Thread S Ellison
Apologies; my earlier reply preceded this extra info. If you are reading a large file with duplicate row names, try reading it in as is, then simply converting the numeric parts to a matrix. For example, if you had the same kind of data frame as before x1 - rnorm(11,5,1) x2 - runif(11,0,1) nam -

Re: [R] 2 way ANOVA with possible pseudoreplication

2009-04-30 Thread S Ellison
Well, it's clearly not pseudoreplication if it's not replication! But the observations within animal could well be associated. You seem to have a straightforward experiment with multiple treatment combinations on multiple subjects. You could do several things. The most obvious is probably to

Re: [R] A variation on the bar plot

2009-05-04 Thread S Ellison
It's sometimes called a pyramid plot. The plotrix package has one. See ?pyramid.plot dxc13 dx...@health.state.ny.us 05/04/09 7:58 PM Hi all, I cannot think of the technical name of this plot, but I want to create a plot with the data below that looks like two back-to-back horizontal bar

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread S Ellison
The problem is in the code. When you say mysummary-tapply(myfactor,mydata,length) mysummary you have used mydata as a factor and myfactor as the data. tapply has (correctly) used the ordered labels in the grouping factor (mydata) to label its output. If you did what you probably intended:

Re: [R] Show name of dataset in graph

2009-05-07 Thread S Ellison
The usual way of doing this in R functions is via deparse, as in the examples in ?deparse: fd-function(x) plot(x, main=deparse(substitute(x))) q-1:10 fd(q) as.character works for simple cases but is probably not the best option. Compare fd(log(q)) with fc-function(x) plot(x,

Re: [R] Plotting questions

2009-05-08 Thread S Ellison
lehe timlee...@yahoo.com 08/05/2009 09:58:40 1. How to plot several lines in a figure? See ?lines 2. How to open another figure window? see ?windows *** This email and any attachments are confidential. Any

Re: [R] Histogram frequencies with a normal pdf curve overlay

2009-05-09 Thread S Ellison
Assuming a constant bin width, you need to multiply the density by n*binwidth, where the bin width is (obviously!) the width of the histogram bins. Jacques Wagnor jacques.wag...@gmail.com 05/09/09 5:10 PM Dear List, When I plot a histogram with 'freq=FALSE' and overlay the histogram with a

Re: [R] not R question : alternative to logistic regression

2007-11-16 Thread S Ellison
Probabilities can only be even approximately linearly related to a continuous predictor variable for a limited range, otherwise the model will predict probabilities below 0 or above 1. At some point, they have to tail off... unless you are modelling something trivial like 'probability of being

Re: [R] biplot

2007-11-20 Thread S Ellison
Also check the asp= parameter in plot.default and plot.window; this sets the aspect ratio so that 1 unit in x is the same physicla length as 1 unit in y. I don;t know whether it is respeced by your particular biplot, though. Bernardo Rangel Tura [EMAIL PROTECTED] 20/11/2007 10:51:12 On Mon,

Re: [R] more outrageous plotting

2007-11-23 Thread S Ellison
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 Z to do

Re: [R] Organising tick-marks in plot()

2007-11-30 Thread S Ellison
Ted, I don't think you can include the axis ticks in plot(), but you can specify them in axis() using plot(x,y,xlim=c(0,1000), axes=F) box() axis(1,at=seq(0,1000,50),labels=F) axis(1,at=seq(0,1000,200),labels=T) Obviously, if you want this to be variable for different xlim etc, your simplest

Re: [R] Barchart, Pareto

2007-12-11 Thread S Ellison
--- Kapoor, Bharat [EMAIL PROTECTED] wrote: 1.I could not print the data in ROF column below the bar charts, How to get full labels for each bar insted I createda new coumn ReasonCode just to fit below the bars. You could plot the barchart horizontally, and increase the margins to

Re: [R] book on regular expressions

2007-12-12 Thread S Ellison
hadley wickham [EMAIL PROTECTED] 11/12/2007 17:02 Could someone recommend a good book on regular expressions with focus on applications/use as it might relate to R. I remember there was a mention of such a reference book recently, but I could not locate that message on the archive. It's

Re: [R] Res: Scatterplot Showing All Points

2007-12-18 Thread S Ellison
?jitter is simpler: x-rep(1:10,10) y-x plot(x,y) #100 points, only 10 show plot(jitter(x),jitter(y)) #overlap removed. Milton Cezar Ribeiro [EMAIL PROTECTED] 18/12/2007 04:36 Hi Wayne, I have two suggestion to you. 1. You add some random noise on both x and y data or 2. You

Re: [R] Dual Core vs Quad Core

2007-12-18 Thread S Ellison
Hiding in the windows faq is the observation that R's computation is single-threaded, and so it cannot use more than one CPU. So multi-core should make no difference other than allowing R to run with less interruption from other tasks. That is often a significant advantage, though. Andrew

[R] Behaviour of standard error estimates in lmRob and the like

2008-01-11 Thread S Ellison
I am looking at MM-estimates for some interlab comparison work. The usual situation in this particular context is a modest number of results from very expensive methods with abnormally well-characterised performance, so for once we have good variance estimates (which can differ substantially for

Re: [R] is it safe to replace every - by = in R code?

2008-01-13 Thread S Ellison
.. and don't forget that 6 - x works but 6 = x won't ... Gabor Grothendieck [EMAIL PROTECTED] 01/13/08 10:50 PM No. f - function(a = 3, b = 4) a-b f(b = 10) [1] -7 f(b - 10) [1] 6 but if you only replace it in the context: x - ... then it should be ok. On Jan 13, 2008 5:41 PM, Nasser

  1   2   3   4   5   6   7   >