[R] Accounting for clustered data in Rpart or Mvpart

2005-05-27 Thread Luwis Tapiwa Diya
I am working on data that is in clusters (eg events from persons in the family).So I have a clustered data set up and would like to build a tree(regression /classification tree) taking into account this clustered nature of the data. Do anybody know how to do this or maybe the code to take into

[R] Soil texture triangle in R?

2005-05-27 Thread Sander Oom
Dear R users, has anybody made an attempt to create the soil texture triangle graph in R? For an example see here: http://www.teachingkate.org/images/soiltria.gif I would like to get the lines in black and texture labels in gray to allow for plotting my texture results on top. Any

[R] mixed-integer optimisation

2005-05-27 Thread John Marsland
Does anybody know of a R package to solve mixed-integer quadratic optimisations with constraints? Alternatively is anybody working with an R interface to ILOG CPLEX which seems to be the 'best' commercial product in this area? Finally, is there any relationship between the R-project and AMPL

Re: [R] Contingency tables from data.frames

2005-05-27 Thread Jose Claudio Faria
The final version with the help of Gabor Grotendieck (thanks Gabor, very much!) ### # EasieR - Package # ### # Common function er.make.table - function(x, start, end, h,

Re: [R] Simplify formula for heterogeneity

2005-05-27 Thread Stefaan Lhermitte
Thank you very much Ted! I have been looking at your simplification for more then an hour, but I don't see how you did it. Could you perhaps, if it is not to much work, explain me how you reduced H? It would help me to understand what I am realy doing. Looking at the result, it seems indeed

[R] Testing Nonlinear Restrictions

2005-05-27 Thread Jacho-Chavez,DT (pgr)
Dear all, I'm interested in testing 2 nonlinear restrictions on coefficients of a nls object. Is there a package for doing this? Something in the lines of `test(nls object, res=c(res 1,res 2),...)' I only found the function delta.method in the alr3 library that calculates the se of a singleton

[R] cancor

2005-05-27 Thread zjao yana
Hello, I'm a beginner to use R. When use cancor to analysis two data set X,Y, for example: can-cancor(X, Y) then 5 components are returned, that is cor, xcoef, ycoef, xcentre, ycentre; The explained variance can be calculated by X %*% can$xcoef or Y %*% can$ycoef, but how to alculate the

[R] R commandline editor question

2005-05-27 Thread Ajay Narottam Shah
I am using R 2.1 on Apple OS X. When I get the prompt, I find it works well with emacs commandline editing. Keys like M-f C-k etc. work fine. The one thing that I really yearn for, which is missing, is bracket matching When I am doing something which ends in it is really useful to have

Re: [R] R commandline editor question

2005-05-27 Thread Robin Hankin
Hi Ajay well ESS has such a facility. However, I think Mathematica has a super scheme: unbalanced brackets show up in red, making them obvious. This is particularly good for spotting wrongly interleaved brackets, as in ([ blah di blah )] note bracket closure is out of order in which

Re: [R] Power set

2005-05-27 Thread Frank E Harrell Jr
Laura Holt wrote: Hi again! I have a data.frame with the columns y, x1, x2, x3. I would like to fit linear models with one variable at a time, then 2 variables at a time, and then 3. Makes me think of a power set. Makes me think of irreproducible results if you use the output to select a

[R] Function environments lm() weights

2005-05-27 Thread Tobias Muhlhofer
I am writing a function of weighted regression, as a procedure for heteroskedasticity. The function runs an auxiliary regression whose fitted values I assign to fit, and then I go: w - 1/(exp(fit/2)) ## Rerun the old regression ## if(gls) { wtd.model - glm(model,

Re: [R] R commandline editor question

2005-05-27 Thread Ajay Narottam Shah
well ESS has such a facility. However, I think Mathematica has a super scheme: unbalanced brackets show up in red, making them obvious. This is particularly good for spotting wrongly interleaved brackets, as in ([ blah di blah )] note bracket closure is out of order in which

Re: [R] Power set

2005-05-27 Thread James W. MacDonald
Spencer Graves wrote: Hi, Laura: Have you considered regsubsets in library(leaps)? Also, have you done an R site search www.r-project.org - search - R site search for something like all subsets regression? Or much simpler if you are running R-2.1.0, use RSiteSearch(all subsets

Re: [R] Postscript

2005-05-27 Thread Uwe Ligges
Philippe Lamy wrote: Hi, I would like to create a multi-page postscript file. How can I do that in R ? Is it possible ? Yes, simply draw more than one plot. See ?postscript and its argument onefile, which already defaults to TRUE. Uwe Ligges Thanks for help. Philippe

Re: [R] Testing Nonlinear Restrictions

2005-05-27 Thread Spencer Graves
What kind of nonlinear restriction? Can you solve for one or more of the parameters in terms of the other(s) [either directly or implicitly]? If yes, then let fit1 - nls(... full model ... ) fit2 - nls(... restricted model ...) anova(fit1, fit2) If my

Re: [R] Round a line

2005-05-27 Thread Uwe Ligges
Luis Ridao Cruz wrote: R-help, I have lloked in the archives found no answer to how to round the line joint. I have usedthe arguments lnd, ljoin in par but I get no differences in the plotting. x=1:10 par(ljoin=round,lend=round) plot(x,sin(x),type=l,lwd=2) Any suggestions? Well, round

[R] r: LEXICOGRAPHIC ORDERING

2005-05-27 Thread Clark Allan
HI all i have a seemingly simple question. given a sequence of numbers say, 1,2,3,4,5. i would like to get all of the possible two number arrangments (combinations), all 3 number arrangents ... 5 number arrangements (combinations). i.e. in the 2 number case: 12,13,14,15,23,24,25,34,35,45

[R] how to get this kind of binomial distribution simulation number?

2005-05-27 Thread luan_sheng
hai, I want to perform a simulation like this Suppose that I have one population ,it's size is 500, is composed of x,y and z. The probability of x, y and z is respectively is 0.3, 0.5, 0.2. I wan to simulate a new same size population based ratio of x, y and z, how can I get and assess the

Re: [R] longitudinal survey data

2005-05-27 Thread Koen Pelleriaux
On 5/26/05, Thomas Lumley [EMAIL PROTECTED] wrote: If you *want* to fit mixed models (eg because you are interested in estimating variance components, or perhaps to gain efficiency) then it's quite a bit trickier. You can't just use the sampling weights in lme(). You can correct for the

RE: [R] how to get this kind of binomial distribution simulation number?

2005-05-27 Thread Huntsinger, Reid
rmultinom(n=1,size=500,prob=c(0.3,0.5,0.2)) to get n samples each of size 500 just use the n= argument. Reid Huntsinger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of luan_sheng Sent: Friday, May 27, 2005 9:26 AM To: r-help@stat.math.ethz.ch;

[R] 3D density estimation with library sm - no estimate returned

2005-05-27 Thread Gregory Jefferis
Dear List, I have been trying to use library sm to do density estimation on a 3D dataset. I am using the current MacOS X binary of sm from CRAN. If I do this on a 2D dataset, sm.density returns a list including the component estimate which contains the density estimate over a uniform grid.

Re: [R] longitudinal survey data

2005-05-27 Thread h . brunschwig
Thank you for your reply. Does that mean that in order to take in account the repeated measures I denote these as another cluster in R? Dassy Quoting Thomas Lumley [EMAIL PROTECTED]: On Thu, 26 May 2005 [EMAIL PROTECTED] wrote: Dear R-Users! Is there a possibility in R to do

[R] xmlAttrs and problems with reading node attributes of XML file (b ug?)

2005-05-27 Thread Tuszynski, Jaroslaw W.
Hi, Consider the following code: require(XML) xmlFile = paste( ?xml version=\1.0\ encoding=\ISO-8859-1\?\n, mzXML xmlns=\a\ xmlns:xsi=\b\ xsi:schemaLocation=\c\\n, parentFile a=\a\ b=\b\ /\n, /mzXML\n)

[R] plotting box plots on same x

2005-05-27 Thread BJ
I am trying to construct a graph of 6 box plots of blood pressures. I want them to be on a single set of axis and I want the SBP to be ontop of the DBP. I have an array bp with the data in it and I tried a[1,]-c(145,60,147,62,140,57) a[2,]-c(160,75,160,74,160,70) a[3,]-c(140,55,140,65,142,55)

Re: [R] Round a line

2005-05-27 Thread Earl F. Glynn
Luis Ridao Cruz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] R-help, I have lloked in the archives found no answer to how to round the line joint. I have usedthe arguments lnd, ljoin in par but I get no differences in the plotting. x=1:10 par(ljoin=round,lend=round)

[R] box plots without whiskers

2005-05-27 Thread BJ
I searched the archives, but couldnt find any way to do this with boxplot. Is there a way? Thanks again ~BJ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] Chars as numbers

2005-05-27 Thread Tobias Muhlhofer
Josef, Not sure if this is exactly what you mean, but there is a generic function as() to which you can then specify numeric as an argument and which then coerces stuff into numeric format. Tobias Josef Eschgfaeller wrote: Is there a proper function for transforming a character to a

Re: [R] Chars as numbers

2005-05-27 Thread vincent
as.numeric() hih __ R-help@stat.math.ethz.ch 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] Chars as numbers

2005-05-27 Thread Uwe Ligges
Josef Eschgfaeller wrote: Is there a proper function for transforming a character to a number instead of using i=match('c',letters) # 3 I'd suggest to use the above if you really mean it. Note that transforming a character to a number is not well defined, because you have to think

Re: [R] box plots without whiskers

2005-05-27 Thread Uwe Ligges
BJ wrote: I searched the archives, but couldnt find any way to do this with boxplot. Is there a way? Thanks again ~BJ See ?boxplot and its argument par which points you to ?bxp: Now, you can do stuff like boxplot(1:10, pars=list(staplelty=0, whisklty=0)) Uwe Ligges

[R] Using R for classifying new samples

2005-05-27 Thread manav ram
Hello, I do not have any statistical background, So I shall apologise if I am asking trivial question or help. I am trying to work with R. The problem I have on hand is: I have 2 sets of data(means SD for each sample in the group of both sets). The sample size is massive(2000+ in each grp). I

Re: [R] box plots without whiskers

2005-05-27 Thread BJ
Hmm ok, that seems to work with that example, but when I add an at= option i get graphs that are only verticle lines. Sorry to be difficult. ~BJ Uwe Ligges wrote: BJ wrote: I searched the archives, but couldnt find any way to do this with boxplot. Is there a way? Thanks again ~BJ See

Re: [R] box plots without whiskers

2005-05-27 Thread Uwe Ligges
BJ wrote: Hmm ok, that seems to work with that example, but when I add an at= option i get graphs that are only verticle lines. Sorry to be difficult. He? So you need to pe much more precisely in this message as well! boxplot(data.frame(1:10, 2:11), at = 1:2, pars=list(staplelty=0,

Re: [R] plotting box plots on same x

2005-05-27 Thread Marc Schwartz
On Fri, 2005-05-27 at 10:17 -0400, BJ wrote: I am trying to construct a graph of 6 box plots of blood pressures. I want them to be on a single set of axis and I want the SBP to be ontop of the DBP. I have an array bp with the data in it and I tried a[1,]-c(145,60,147,62,140,57)

RE: [R] Using R for classifying new samples

2005-05-27 Thread bogdan romocea
Read this book, Multivariate Statistical Analysis: A Conceptual Introduction by Sam Kash Kachigan. I think it's *great*, and perfect for someone without any statistical background. -Original Message- From: manav ram [mailto:[EMAIL PROTECTED] Sent: Friday, May 27, 2005 10:56 AM To:

Re: [R] box plots without whiskers]

2005-05-27 Thread BJ
---BeginMessage--- boxplot(data.frame(1:10, 2:11), at = 1:2, + pars=list(staplelty=0, whisklty=0), at=1:2) Error in boxplot.default(data.frame(1:10, 2:11), at = 1:2, pars = list(staplelty = 0, : formal argument at matched by multiple actual arguments a-array(dim=c(3,8))

Re: [R] plotting box plots on same x

2005-05-27 Thread J.R. Lockwood
BJ- For the record as well I could not make heads or tails of your question. The dedicated folks who day in, day out field poorly specified questions have no obligation to do so, and have every right to get frustrated when it seems that their time is being taken advantage of. On Fri, 27 May

[R] I never made any assumption athat anyone had any obligation to do anything

2005-05-27 Thread BJ
I just asked a question. If I was too vague, then i am sorry. I dont expect anyone to help me, but I thought that it was ok to put the question out there in case someone wanted to help me. I didnt expect abject hostility for it. Human decency was the only thing I did expect. If my question was

Re: [R] longitudinal survey data

2005-05-27 Thread Thomas Lumley
On Fri, 27 May 2005 [EMAIL PROTECTED] wrote: Thank you for your reply. Does that mean that in order to take in account the repeated measures I denote these as another cluster in R? Yes, but unless you have multistage finite population corrections to put in the design object only the first

Re: [R] Soil texture triangle in R?

2005-05-27 Thread Sander Oom
Right, Got the data points plotted on top of the soil texture background, thanks to Jim and ternaryplot{vcd}! See code below. Now there is some fine tuning to do, as it should really look like this graph: http://soil.scijournals.org/content/vol65/issue4/images/large/1038f2.jpeg Things to

[R] nlminb to optmin

2005-05-27 Thread Stefan Pohl
Hi! I want to convert S-Plus 6.2 code to R 2.1.0. Instead of the function nlminb I use the function optmin optmin(start,fn,gr,method=L-BFGS-B, lower, upper, hess,...) But then I get the Error in optmin ...: L-BFGS-B needs finite values of fn Then I used optmin(start,fn,gr,method=BFGS, hess,

Re: [R] R commandline editor question

2005-05-27 Thread A.J. Rossini
Of course it should be in ESS. In fact, it is for me, anyway (different colors depending on whether they match or not). Check out the paren-hilit or paren-match (or something like that) customize options. I.e. M-x customize-groups ret paren spc (which ought to complete on names of

Re: [R] nlminb to optmin

2005-05-27 Thread Sundar Dorai-Raj
Stefan Pohl wrote: Hi! I want to convert S-Plus 6.2 code to R 2.1.0. Instead of the function nlminb I use the function optmin optmin(start,fn,gr,method=L-BFGS-B, lower, upper, hess,...) But then I get the Error in optmin ...: L-BFGS-B needs finite values of fn Then I used

Re: [R] nlminb to optmin

2005-05-27 Thread Douglas Bates
Stefan Pohl wrote: Hi! I want to convert S-Plus 6.2 code to R 2.1.0. Instead of the function nlminb I use the function optmin optmin(start,fn,gr,method=L-BFGS-B, lower, upper, hess,...) But then I get the Error in optmin ...: L-BFGS-B needs finite values of fn Then I used

Re: [R] longitudinal survey data

2005-05-27 Thread h . brunschwig
Sorry, still confused. If I dont have fpc's ready in my dataset (calculate myself?) that means that R will use the weight of an individual for each of his repeated observations. But is that then still correct? The cluster individual is ignored and each observation of an individual has the same

Re: [R] Soil texture triangle in R?

2005-05-27 Thread Sander Oom
Cleaned up the class divisions and created a full function. Still to do: - rotate axis labels; - correct the partial covering of the bottom tick labels; - rotate ticks in order to simplify viewing the graph. See: http://soil.scijournals.org/content/vol65/issue4/images/large/1038f2.jpeg Wonder

[R] Windows binary version of port_0.1-1 available

2005-05-27 Thread Douglas Bates
In an earlier message today I mentioned that a source package with a version of nlminb for R was available as http://www.stat.wisc.edu/~bates/port_0.1-1.tar.gz Thanks to Kjetil Halvorsen there is now a Windows binary version available as http://www.stat.wisc.edu/~bates/port_0.1-1.zip

Re: [R] I never made any assumption athat anyone had any obligation to do anything

2005-05-27 Thread Spencer Graves
Hello, Erithid: I'm very sorry you feel you got yelled at first thing in the morning. Please try not to take it personally, though I know that may be difficult. After one superficially insulting reply, I just laughed and told my manager, Look what I learned for exposing myself to

[R] images and maps in R

2005-05-27 Thread yyan liu
Hi: I have a question arising from my project. A sample of the data is below. The first row stands for the names of state in USA. The second row stand for some numeric value in that state. Some of them are NA. I can use the commands data(stateMapEnv) and map('state', fill = F) in library maps

[R] installing spatstat in OSX

2005-05-27 Thread R JC
Friends, I am trying to install the current version of spatstat on Mac OS 10.3.9, but the compilation fails with the following messages at the end: ld: warning -L: directory name (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist ld: can't locate file for: -lg2c make: ***

Re: [R] images and maps in R

2005-05-27 Thread Don MacQueen
This is is not difficult from the online help for the map() function. Here is an example. map('state', region = c('new york', 'new jersey', 'penn'),fill=TRUE,col=1:4) There is also an example there in how to add text to the map. Another way uses the maptools package. require(maptools)

Re: [R] longitudinal survey data

2005-05-27 Thread Thomas Lumley
On Fri, 27 May 2005 [EMAIL PROTECTED] wrote: Sorry, still confused. If I dont have fpc's ready in my dataset (calculate myself?) that means that R will use the weight of an individual for each of his repeated observations. But is that then still correct? The cluster individual is ignored and

Re: [R] I never made any assumption athat anyone had any obligation to do anything

2005-05-27 Thread James MacDonald
To add to Spencer's reply, I have two things. First, if you look back at your earlier list entries, Uwe asked you politely at least twice to read the posting guide. The reason for this is that the posting guide gives guidance to allow you to post questions that are clear enough to answer, and

Re: [R] I never made any assumption athat anyone had any obligation to do anything

2005-05-27 Thread Gabor Grothendieck
Perhaps the list would work better if posters who do not follow the posting guide are nicely told that they will more likely get helpful replies if they read and follow the posting guide and, in particular, provide a reproducible example. If the poster does not follow that advice then the poster