Re: [R] multicolumn sort on dataframe?

2004-03-29 Thread Adrian Dusa
Dear Jeff, I believe this works: data.frame - data.frame[order(data.frame$var.1, data.frame$var.2),] HTH, Adrian Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel./Fax: +40 (21) 312.66.18\

[R] The MoRST email gateway has detected a Virus in your message

2004-03-29 Thread infinity
The MoRST email gateway has stopped the following message: Message: B8da4c.0001.mml From:[EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Mail Delivery (failure [EMAIL PROTECTED]) Because it believes the message contains a virus. The virus scanning software used

Re: [R] Problems with optimize

2004-03-29 Thread Uwe Ligges
Chiara Seghieri wrote: Dear All, I'm trying to maximize a likelihood with respect one parameter using optimize on simulated data (without error component). I've iterated the maximization procedure 1000 times and I should always obtain the same estimate of the parameter (equal to the simulated

RE: [R] Problems with optimize

2004-03-29 Thread Wayne Jones
If indeed your error space is pitted with local minima then I suggest you might try a method called bootstrap restarting to avoid these spurious local minimas. The paper was authored by Simon Wood and can be found here http://www.stats.gla.ac.uk/~simon/simon/papers/bsfit.pdf -Original

[R] Subsrcribe r-help

2004-03-29 Thread MR. JUNE ELIJAH SIMAKANI
** June Elijah Simakani Department of Statistics University of Port Elizabeth, Vista Campus P.O.Box 1600, Port Elizabeth 6000 South Africa Tel.no: + 27(41) 408 3234(w) + 27(41) 582 1573(h) Fax.no: + 27(41) 464 2859

RE: [R] c() question

2004-03-29 Thread Simon Fear
Christoph, yes there IS a way, such as the horrible eval(parse(text=paste(c(, my.group[1], = , class.weight[2], ,, my.group[2], = , class.weight[1], ), sep=))) BUT I would suggest you rethink whether there isn't a an altogether more straightforward way to do what you want. For example, tmp

RE: [R] Interpreting knn Results

2004-03-29 Thread Liaw, Andy
Maybe you should show your colleague how to access help pages in R? Right in ?knn, it says: prob: If this is true, the proportion of the votes for the winning class are returned as attribute 'prob'. so 1.0 mean all three NNs are of the `winning'; i.e., predicted, class, and

[R] Extrange behaviour of Gcc-3.3

2004-03-29 Thread Virgilio Gómez Rubio
Dear R users, I have found a quite uncommon behaviour when compiling a library I want to call from R (avce00, in package RArcInfo). I define CPL_LSB (-DCPL_LSB is passed to the compiler in the command line) but it's useless, since #ifdef CPL_LSB ... #endif clauses doesn't notice that CPL_LSB is

RE: [R] Interpreting knn Results

2004-03-29 Thread Ko-Kang Kevin Wang
Hi, -Original Message- From: Liaw, Andy [mailto:[EMAIL PROTECTED] Maybe you should show your colleague how to access help pages in R? Right in ?knn, it says: prob: If this is true, the proportion of the votes for the winning class are returned as attribute 'prob'.

[R] rpart or mvpart

2004-03-29 Thread Ben Stewart-Koster
__ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] data usage

2004-03-29 Thread Edwin Leuven
hello, for my present project i need to use the data stored in a ca. 100mb stata dataset. when i import the data in R using: library(foreign) x-read.dta(mydata.dta) i find that R needs a startling 665mb of memory! (in stata i can simply allocate, say, 128mb of memory and go ahead) is there

[R] problem with update.packages() - SOLVED

2004-03-29 Thread Stefano Calza
Hi, problem solved passing to R 1.9.0 (in the Debian unstable branch). Stefano __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] data usage

2004-03-29 Thread Douglas Bates
Edwin Leuven [EMAIL PROTECTED] writes: for my present project i need to use the data stored in a ca. 100mb stata dataset. when i import the data in R using: library(foreign) x-read.dta(mydata.dta) i find that R needs a startling 665mb of memory! (in stata i can simply allocate,

RE: [R] Could someone email me with the code for glm.nb ?

2004-03-29 Thread Liaw, Andy
Dear Dr. Brainard, In addition to what Roger has pointed out, I would like to point out one fact that you seem not to be aware of. Open source software, by and large, have licences, just as the proprietary ones. Openly asking others to send you the code, IMHO, is plain disregard of the licence

[R] calculate length of gradient ?

2004-03-29 Thread Andreas Plank
Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Level: X-Spam-Status: No, hits=4.2 required=5.0

Re: [R] data usage

2004-03-29 Thread Edwin Leuven
What does the 665 MB represent? Did you try doing a garbage collection after you had done the import? i didn't (sorry, R beginner) i followed your example and things look much better now, and object.size(x) returns: 219,167,604 which is about double the size of the same object in stata

[R] strange thing with sd

2004-03-29 Thread Andreas Pauling
Dear R people I came across a strange thing: sd(rep(0.01, 15)) #0 sd(rep(0.001, 15)) #4.489023e-19 sd(rep(0.1, 15)) #0 sd(rep(0.0001,15)) #1.712427e-24 sd(rep(0.01, 13)) #1.805557e-18 sd(rep(0.001, 13)) #4.513894e-19 sd(rep(0.1, 13)) #0

[R] UNION

2004-03-29 Thread Margarida Júlia Rodrigues Igreja
Hi, I have a problem, can you help? When i type: library(RODBC) a-odbcConnect(oracle) sqlQuery(a,(select VALFACT500 from EPISGDHS) UNION (select VALFACT1000 from EPISGDHS)) Comes the error: [1] S1000 923 [unixODBC][Easysoft][Oracle]ORA-00923: FROM keyword not found where expected at

RE: [R] strange thing with sd

2004-03-29 Thread Rau, Roland
Hello, -Original Message- From: Andreas Pauling [SMTP:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 4:02 PM To: [EMAIL PROTECTED] Subject: [R] strange thing with sd Shouldn't it give always zero? I was running your example code, and I always had the result zero

Re: [R] strange thing with sd

2004-03-29 Thread Peter Flom
I tried your sample code, and a few other variations, and got 0 for all of them, running R 1.8.1 on a Windows machine Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes 71 W. 23rd St

Re: [R] strange thing with sd

2004-03-29 Thread Barry Rowlingson
Peter Flom wrote: I tried your sample code, and a few other variations, and got 0 for all of them, running R 1.8.1 on a Windows machine Not only do I get 0 on R 1.8.1 on Unix (linux, RH8), I get _exactly_ 0. I thought this was going to be a simple arithmetic precision problem, but this test

Re: [R] strange thing with sd

2004-03-29 Thread Andreas Pauling
Zitat von Barry Rowlingson [EMAIL PROTECTED]: Peter Flom wrote: I tried your sample code, and a few other variations, and got 0 for all of them, running R 1.8.1 on a Windows machine Not only do I get 0 on R 1.8.1 on Unix (linux, RH8), I get _exactly_ 0. I thought this was going to

RE: [R] strange thing with sd

2004-03-29 Thread Hanke, Alex
Just so you don't feel that you are alone I get the same response as you use R1.8.0 on an XP operating system. Alex -Original Message- From: Andreas Pauling [mailto:[EMAIL PROTECTED] Sent: March 29, 2004 10:02 AM To: [EMAIL PROTECTED] Subject: [R] strange thing with sd Dear R

[R] BETWEEN

2004-03-29 Thread Margarida Júlia Rodrigues Igreja
Hi, I have another problem, can you help? When i type: library(RODBC) a-odbcConnect(oracle) sqlQuery(a,select DISTINCT(DOENT_ID) from EPISGDHS where (VALFACT BETWEEN 100 AND 50)) Comes the error: [1] S1000 904 [unixODBC][Easysoft][Oracle]ORA-00904: \DOENT_ID\: invalid identifier at

RE: [R] data usage

2004-03-29 Thread Liaw, Andy
Is the ca. 100MB the size of the .dta file, or the size of the data when loaded into Stata? Or is there not a difference? Have you checked the size of the .rda file created as Doug had suggested? I'd be curious to see what that is... Andy From: Edwin Leuven What does the 665 MB

[R] Confidence Intervals for slopes

2004-03-29 Thread David Orme
Hi, I'm trying to get confidence intervals to slopes from a linear model and I can't figure out how to get at them. As a cut 'n' paste example: # # dummy dataset - regression data for 3 treatments, each treatment with different (normal) variance x - rep(1:10, length=30) y - 10

Re: [R] strange thing with sd

2004-03-29 Thread Uwe Ligges
Andreas Pauling wrote: Dear R people I came across a strange thing: sd(rep(0.01, 15)) #0 sd(rep(0.001, 15)) #4.489023e-19 sd(rep(0.1, 15)) #0 sd(rep(0.0001,15)) #1.712427e-24 sd(rep(0.01, 13)) #1.805557e-18 sd(rep(0.001, 13)) #4.513894e-19 sd(rep(0.1,

RE: [R] data usage

2004-03-29 Thread Edwin Leuven
On Mon, 29 Mar 2004, Liaw, Andy wrote: Is the ca. 100MB the size of the .dta file, or the size of the data when loaded into Stata? Or is there not a difference? i think it is about the same. info on the processes using top to get an idea of memory use of R vs Stata using the same data:

Re: [R] data usage

2004-03-29 Thread Edwin Leuven
Stata tends to store data as float, integer, or even byte where appropriate for the precision. This is one source of space saving. A factor of 2 is not atypical. i was suspecting something like this. what does R do? default to double always (or something like this)? is this a deliberate

Re: [R] Confidence Intervals for slopes

2004-03-29 Thread Andrew Robinson
David, try the estimable() function in the gregmisc package. Andrew On Monday 29 March 2004 06:44, David Orme wrote: Hi, I'm trying to get confidence intervals to slopes from a linear model and I can't figure out how to get at them. As a cut 'n' paste example: # # dummy

RE: [R] logo

2004-03-29 Thread Knut M. Wittkowski
Dear Cecilia, while Saghir and Kjetil may have a point, guidances are no laws. After all, it's your presentation and only you can decide what suits the specific purpose best. An R logo can be found on http://www.r-project.org/foundation/. Knut At 09:17 2004-03-29 +0200, Bashir Saghir (Aztek

[R] StepAIC

2004-03-29 Thread Christian Hennig
Dear list, here is an example of stepAIC that I do not understand. The data is n=42, Lage is the only factor and there are four other variables treated as continuous. First you see the stepAIC-forward solution (fs7). The strange thing here is that apparently not all interactions are tried for

Re: [R] calculate length of gradient ?

2004-03-29 Thread Jari Oksanen
On 29 Mar 2004, at 16:54, Andreas Plank wrote:on=2.63 my question is about ordination technics: To decide using a linear model response or a unimodal model response, in Canoco (software for ordination technics) you can calculate a so-called length of gradient. (from Canoco Help file:) The length

[R] using hist breaks as factor ?

2004-03-29 Thread Oleg Bartunov
I have numeric vector z and I want to factorize it using z$breaks which I got from histograms breaks. Is there an elegant way to do this ? I, probably, could write a loop and check if z hits into some interval and replace z with value of z$mids, but I suspect there is more R-ish way.

[R] How to purchase R on CD

2004-03-29 Thread George_Heine
My organization has a policy against installing software downloaded from the Internet. There is a waiver procedure, but it is difficult and lengthy. It is much easier to get approval to purchase software, even if it is a CD copy of open-source. However, a search on r-project.org didn't seem

Re: [R] using hist breaks as factor ?

2004-03-29 Thread Gabor Grothendieck
Oleg Bartunov oleg at sai.msu.su writes: I have numeric vector z and I want to factorize it using z$breaks Have a look at: ?cut __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

RE: [R] How to purchase R on CD

2004-03-29 Thread Liaw, Andy
If you can use Linux, you can buy a Quantian CD from cheapbyte.com for $4.99, I believe. Quantian is a `live' CD: You pop it in the CD drive, boot up the computer, and voila, it runs Debian Linux right off the CD, without touch the hard drive. Quantian has R and a whole suite of other

Re: [R] How to purchase R on CD

2004-03-29 Thread Chuck Cleland
[EMAIL PROTECTED] wrote: My organization has a policy against installing software downloaded from the Internet. There is a waiver procedure, but it is difficult and lengthy. It is much easier to get approval to purchase software, even if it is a CD copy of open-source. However, a search on

Re: [R] How to purchase R on CD

2004-03-29 Thread Gabor Grothendieck
George_Heine at blm.gov writes: My organization has a policy against installing software downloaded from the Internet. Check out: http://dirk.eddelbuettel.com/quantian.html __ [EMAIL PROTECTED] mailing list

Re: [R] How to purchase R on CD

2004-03-29 Thread Barry Rowlingson
[EMAIL PROTECTED] wrote: My organization has a policy against installing software downloaded from the Internet. There is a waiver procedure, but it is difficult and lengthy. It is much easier to get approval to purchase software, even if it is a CD copy of open-source. However, a search on

Re: [R] strange thing with sd

2004-03-29 Thread Douglas Bates
sd(rep(0.01, 15)) #0 sd(rep(0.001, 15)) #4.489023e-19 sd(rep(0.1, 15)) #0 sd(rep(0.0001,15)) #1.712427e-24 sd(rep(0.01, 13)) #1.805557e-18 sd(rep(0.001, 13)) #4.513894e-19 sd(rep(0.1, 13)) #0 sd(rep(0.0001,13)) #0 sd(rep(5.01,15)) #0

RE: [R] How to purchase R on CD

2004-03-29 Thread Leonard Assis
Why Dont U Download and Burn into a CD at your Home? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Rowlingson Sent: Monday, March 29, 2004 3:08 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [R] How to purchase R on CD [EMAIL

RE: [R] gregmisc: install trouble

2004-03-29 Thread Christian Reilly
Thnak you all, I was running R-base-care 1.5.01 (the debian site default). I replaced this (at Uwe's suggestion) with 1.8.1 from the CRAN site and gregmisc installs and runs cleanly. Thanks again, Christian On Mon, 29 Mar 2004, Warnes, Gregory R wrote: Date: Mon, 29 Mar 2004 08:59:51

[R] adjusted R squared

2004-03-29 Thread Zachary C Shirkey
I have run several glm models and would like to obtain the adjusted R squared for the model. What is the appropriate command for obtaining an adjusted R squared? __ [EMAIL PROTECTED] mailing list

Summary + Thx: [R] How to add a top X-axis with a different logarithmic scale?

2004-03-29 Thread Itay Furman
Thanks to Marc Schwartz and Jim Lemon for their solutions, and the very useful document by JL. This is a summary in case it is useful to others. My problem was to provide, for the same data series, two different X ordinates ('axes' was probably a misnomer here). In this case, both ordinates

RE: [R] Confidence Intervals for slopes

2004-03-29 Thread BXC (Bendix Carstensen)
You may want: lm( y ~ x:z ) This is the same model you fitted, but prametrized differently. But please check that what you REALLY want is not lm( y ~ z + x:z ) This is the model with different intercepts as well. Bendix Carstensen -- Bendix Carstensen Senior Statistician

Re: [R] dev.print

2004-03-29 Thread Scott Bartell
Thanks for the explanation. I actually had read the help page for dev.print after finding this statement in the Defunct help page (while searching for savePlot): The new function `dev.print()' should now be used for saving plots to a file or printing them. Personally I didn't find the

Re: [R] using hist breaks as factor ?

2004-03-29 Thread Oleg Bartunov
On Mon, 29 Mar 2004, Gabor Grothendieck wrote: Oleg Bartunov oleg at sai.msu.su writes: I have numeric vector z and I want to factorize it using z$breaks Have a look at: ?cut Thanks for pointers, this is what I needed. __ [EMAIL PROTECTED]

Re: [R] cut and factor

2004-03-29 Thread Oleg Bartunov
Eric, thanks for quick reply. at first look I thought it is what I need, but, unfortunately, it doesn't applied to original data - it creates new data with loosing original indexes ! I want to keep indexes of original data, but replace original data with $mids of corresponding $breaks. So, if I

Re: [R] cut and factor

2004-03-29 Thread Gabor Grothendieck
Oleg Bartunov oleg at sai.msu.su writes: I want to keep indexes of original data, but replace original data with $mids of corresponding $breaks. Note the label= arg on cut: cut(z,t$breaks,lab=t$mids) __ [EMAIL PROTECTED] mailing list

Re: [R] cut and factor

2004-03-29 Thread Achim Zeileis
On Tue, 30 Mar 2004 00:06:39 +0400 (MSD) Oleg Bartunov wrote: Eric, thanks for quick reply. at first look I thought it is what I need, but, unfortunately, it doesn't applied to original data - it creates new data with loosing original indexes ! I want to keep indexes of original data, but

[R] how transform excell file to text file in R

2004-03-29 Thread solares
Hello, it want to know if there is a library that transform a file in excell (*. xls) to text file(*.txt, *,prn, *.csv). Thanks __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] cut and factor

2004-03-29 Thread Oleg Bartunov
On Mon, 29 Mar 2004, Achim Zeileis wrote: On Tue, 30 Mar 2004 00:06:39 +0400 (MSD) Oleg Bartunov wrote: Eric, thanks for quick reply. at first look I thought it is what I need, but, unfortunately, it doesn't applied to original data - it creates new data with loosing original indexes

RE: [R] how transform excell file to text file in R

2004-03-29 Thread Mark Fowle
Maybe but, From excel save as then set type to one that you want. Perl has some tools for this, and various Windows scripting languages can do this. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 3:22 PM To: [EMAIL PROTECTED] Subject:

[R] Interesting Behavior in plot()

2004-03-29 Thread Clint Bowman
I have a 2 by 226200 table, conveniently read in by read.table(), which exhibits some strange behavior when plotted by plot(V1,V2). The general pattern for the range of windspeeds, [0V150] is as expected -- the wind gust falls in the interval [V1V265] except for certain values of V2. For V2 ==

Re: [R] Interesting Behavior in plot()

2004-03-29 Thread Duncan Murdoch
On Mon, 29 Mar 2004 14:06:36 -0800 (PST), Clint Bowman [EMAIL PROTECTED] wrote : I have a 2 by 226200 table, conveniently read in by read.table(), which exhibits some strange behavior when plotted by plot(V1,V2). The general pattern for the range of windspeeds, [0V150] is as expected -- the wind

[R] Right shift for normality

2004-03-29 Thread gwiggner
Hello, My data is discrete, taking values between around -5 and +5. I cannot give bounds for the values. So I consider it as numerical data and not categorical data. The histogram has a 'normal' shape, so I test for normality via a chisquare statistic (by calculating the expected values by

Re: [R] Interesting Behavior in plot()

2004-03-29 Thread Clint Bowman
Right on. The convenience of slurping up data with read.table() and the nearly expected plot caused me to overlook that V2 was read in as a factor. I also had quite a few NAs which may have contributed to the problem. Thanks On Mon, 29 Mar 2004, Duncan Murdoch wrote: On Mon, 29 Mar 2004

Re: [R] data usage

2004-03-29 Thread Thomas Lumley
On Mon, 29 Mar 2004, Edwin Leuven wrote: Stata tends to store data as float, integer, or even byte where appropriate for the precision. This is one source of space saving. A factor of 2 is not atypical. i was suspecting something like this. what does R do? default to double always (or

RE: [R] Right shift for normality

2004-03-29 Thread Ted Harding
On 29-Mar-04 [EMAIL PROTECTED] wrote: Hello, My data is discrete, taking values between around -5 and +5. I cannot give bounds for the values. So I consider it as numerical data and not categorical data. The histogram has a 'normal' shape, so I test for normality via a chisquare

Re: [R] StepAIC

2004-03-29 Thread Jari Oksanen
On 29 Mar 2004, at 19:07, Christian Hennig wrote: Dear list, First you see the stepAIC-forward solution (fs7). The strange thing here is that apparently not all interactions are tried for inclusion, but only WQ:Lage. In particular, I think that WFL:Lage should be tried in the last two steps,

Re: [R] problem with update.packages()

2004-03-29 Thread Berwin A Turlach
G'day Stefano, SC == Stefano Calza [EMAIL PROTECTED] writes: SC Hi. I'm experiencing a problem with updating packages on R SC 1.8.1 (2003-11-21) on Debian testing. I get the following SC message when updating for example Design: SC ... ... /usr/bin/ld: cannot find -lg2c-pic

[R] RAqua and gcc

2004-03-29 Thread Kosuke Imai
Hi, I've recently purchased PowerBookG4 (panther) and installed RAqua 1.8.1. I also installed gcc version 3.3 through Xcode tools. But, for some reason, I'm having a hard time getting gcc work with R. For example, I get the following error while installing Hmisc package. I would appreciate any

Re: [R] RAqua and gcc

2004-03-29 Thread Andrew Robinson
Kosuke, I tried to reproduce your error, running OS X 10.3.3, R 1.8.1. and gcc 3.3 20030304. Hmisc installed without any problem. Sorry that I couldn't help more. Andrew On Monday 29 March 2004 20:21, Kosuke Imai wrote: Hi, I've recently purchased PowerBookG4 (panther) and installed

[R] [R-pkgs] Moron v0.6.0b released

2004-03-29 Thread Igor Wronsky
We are pleased to announce that the development of the notorious Method for Object Recognition of Obscure Nature (or Moron, for short) has been switched to the R language. Given a directory of images (i.e. jpegs), Moron attempts to predict a category distribution for the content of each image.

[R] Recursive regression on a logistic model

2004-03-29 Thread VUILLEUMIER Mathieu
Hello ! I need help ! I would like to make a recursive regression on a logistic model (or linear model) to test the the stability of my data. Is anybody know if R has a special command or not ? Thanks for your help. Best regards, **