Re: [R] INDVAL and mvpart

2005-08-09 Thread Jari Oksanen
Agnieszka, Package 'mvpart' is documented. In this case, ?rpart.object explains *where* in the rpart object is the membership vector. cheers, jari oksanen On Mon, 2005-08-08 at 16:02 +0200, [EMAIL PROTECTED] wrote: > Hi, > > I'd like to perform Dufrene-Legendre Indicator Species Analysis for >

[R] more on vector vs array

2005-08-09 Thread alessandro carletti
Ok, thanks, I'll try with a simplier example: I have a vector with 4 levels dataframe 1 station temp aaa12 aaa13 bbb12 bbb20 aaa23 bbb21 ccc30 ccc18 ddd15 aaa11 ddd15 ddd10 and a thresholds vector

Re: [R] Reading large files in R

2005-08-09 Thread Andreas Hary
You can also use the RODBC package to hold the data in a database, say MySQL and only import it when you do the modelling, e.g. > library(RODBC) > library(sspir) > con <- odbcConnect("MySQL Test") > data(vandrivers) > sqlSave(con,dat=vandrivers,append=FALSE) > rm(vandrivers) > gc() > van.call <-

Re: [R] more on vector vs array

2005-08-09 Thread Dimitris Rizopoulos
you could use something like this: dat1 <- data.frame(station = rep(letters[1:5], 4), temp = round(rnorm(20, 15, 3))) dat2 <- data.frame(station = letters[1:5], temp = round(rnorm(5, 15, 4))) dat <- merge(dat1, dat2, by = "station") do.call("rbind", lapply(split(dat, dat$station

Re: [R] two term exponential model

2005-08-09 Thread Ted Harding
On 09-Aug-05 Prof Brian Ripley wrote: > On Mon, 8 Aug 2005, Deming Mi wrote: > >> Does anybody know if there is an R function (package) to fit a >> two-terms exponential model like y = a*exp(bx) + c*exp(dx) >> where y is dependent variable and x is independent variable. >> MATLAB has a Curve Fitti

Re: [R] Groups in histograms?

2005-08-09 Thread Fredrik Karlsson
Dear list, Sorry for answering my own post, but I have had partial sucess in this. With the panel function below, I get separate histograms in each panel using the group argument. histogram(~vot | agem, nint=50,data=work,groups=Type, subset=agem > 24 & agem < 30, panel=panel.grouphist,type="count

[R] archive of models

2005-08-09 Thread Vassily Shvets
I'm wondering if there's a possibility of having a bunch of models that have already been assembled and run using R, that might be available to users? My own interest is in AR and msm models, but examples would seem to be of great use to all kinds of statistical analyses with R-- surely "a picture

Re: [R] more on vector vs array

2005-08-09 Thread Patrick Burns
If 'thr' were a vector with the stations as names, then you could do (untested): above <- dataframe1[, 'temp'] > thr[as.character(dataframe1[, 'station'])] Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") ales

Re: [R] INDVAL and mvpart

2005-08-09 Thread astrzelczak
Hello Jari, I've tried to do the analysis this way: > duleg(data.matrix(dane[,9:28]),predict(fit,type="vector"),numitr=1000) Error in "row.names<-.data.frame"(`*tmp*`, value = NULL) : invalid 'row.names' length I haven o idea what's going on with the row names cheers :) Agnieszka

Re: [R] AIC model selection

2005-08-09 Thread Adaikalavan Ramasamy
True. But from the "Note" section of help(step) : This is a minimal implementation. Use 'stepAIC' in package 'MASS' for a wider range of object classes. And from author(s) section : B. D. Ripley: 'step' is a slightly simplified version of 'stepAIC' in package 'MASS' (Venable

Re: [R] more on vector vs array

2005-08-09 Thread Adaikalavan Ramasamy
Nice one. But I think you could replace the last line (the one with do.call) with the simpler w <- which( dat[ ,2] > dat[ ,3] ) w [1] 6 11 13 14 16 18 20 dat[ w, ] station temp.x temp.y 6b 18 16 11 c 17 15 13 d 16 14 14 d 17 1

[R] How to pre-filter large amounts of data effectively

2005-08-09 Thread Torsten Schindler
Hi, I'm a R newbie and want to accelerate the following pre-filtering step of a data set with more than 115,000 rows : #- # Function to filter out constant data columns filter.const<-function(X, vectors=c('column', 'row'), tol=0){ realdata=c() filteredX<-matrix() if( ve

Re: [R] use of color for hclust

2005-08-09 Thread Romain Francois
Le 05.08.2005 22:41, Globe Trotter a écrit : >Hi, > >I have a grouping of some observations. I want to cluster them using >hierarchical clustering and compare how the hierarchical clustering shows up >vis-a-vis the groupings. Is it possible to do this in color? I guess what I am >looking for is a

Re: [R] How to pre-filter large amounts of data effectively

2005-08-09 Thread Torsten Schindler
You are right, but unfortunately this is not the limiting step or bottleneck in the code below. The filter.const() function is only used to get the non-constant columns in the training data set, which is initially small (49 rows and 525 columns). And this function is only applied for filtering

Re: [R] How to pre-filter large amounts of data effectively

2005-08-09 Thread Adaikalavan Ramasamy
I do not fully comprehend the codes below. But if I usually want to check if all the elements in a row/column are the same, then I would check the variance or range and see if they are nearly zero. v.row <- apply( mat, 1, var ) v.col <- apply( mat, 2, var ) tol <- 0 good.row <- which( v.

[R] floor() rounding problem?

2005-08-09 Thread Simon Woodhead
Dear all, Could someone please explain the following perculiarity? > 2 == 0.2/0.1 [1] TRUE > 3 == 0.3/0.1 [1] FALSE Similarly, floor(0.2/0.1) = 2 floor(0.3/0.1) = 2 Thank you, Simon __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mai

Re: [R] floor() rounding problem?

2005-08-09 Thread Sean Davis
On 8/9/05 7:42 AM, "Simon Woodhead" <[EMAIL PROTECTED]> wrote: > Dear all, > > Could someone please explain the following perculiarity? > >> 2 == 0.2/0.1 > [1] TRUE >> 3 == 0.3/0.1 > [1] FALSE > > Similarly, > > floor(0.2/0.1) = 2 > floor(0.3/0.1) = 2 This is a FAQ (http://cran.r-project.or

Re: [R] floor() rounding problem?

2005-08-09 Thread Uwe Ligges
Simon Woodhead wrote: > Dear all, > > Could someone please explain the following perculiarity? Please read the FAQ "Why doesn't R think these numbers are equal" (as the posting gude asks you to do). Uwe Ligges > > 2 == 0.2/0.1 > [1] TRUE > > 3 == 0.3/0.1 > [1] FALSE > > Similarly, > > f

Re: [R] floor() rounding problem?

2005-08-09 Thread Dimitris Rizopoulos
Look at ?Comparison, especially in the "Note" section, i.e., 3 == 0.3/0.1 identical(all.equal(3, 0.3/0.1), TRUE) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +3

[R] solution: package install probs. win-xp. file move

2005-08-09 Thread Sean O'Riordain
Hi, This is just an FYI documenting a conflict between R and Google-Desktop. The solution was to click on the Google-Desktop icon in the systray and click on "Pause Indexing". I also temporarily suspended anti-virus scanning before successfully install.packages("VR") many times without getting a

[R] connexion problem getHdata (HMisc)

2005-08-09 Thread anne . piotet
** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. *

[R] clip to keep coordinate system?

2005-08-09 Thread ivo_welch-rstat8303
dear R wizards: plot( 1, 1, ylim=(2,10), xlim=(2,10), type="n"); rect( -1, -1, 12, 12, col=gray(0.99) ); unfortunately wipes out the border axes around the plot. how do I keep this? regards, /ivo __ R-help@stat.math.ethz.ch mailing list https://st

[R] spline curves in R

2005-08-09 Thread Eric yang
Dear all, Is it possible to calculate the first and second derivatives of a cubic spline curve (interpolating through the points) as opposed to a smoothing spline? If so, how is this done? Is it also possible to find the equation of the spline curve that is fitted? Any help is much appreciat

Re: [R] clip to keep coordinate system?

2005-08-09 Thread Thomas Lumley
On Tue, 9 Aug 2005 [EMAIL PROTECTED] wrote: > > dear R wizards: > > plot( 1, 1, ylim=(2,10), xlim=(2,10), type="n"); > rect( -1, -1, 12, 12, col=gray(0.99) ); > > unfortunately wipes out the border axes around the plot. how do I keep > this? I think you meant plot( 1, 1, ylim=c(2,10), xlim=c(

[R] RGUI crash when opening script in XP Home enviroment

2005-08-09 Thread Knut Krueger
If there is a helpfile open (f.e ?glm) and it is the top window, then an exception error occurs (closing RGUI) when I hit the open file button. If the helpfile is not the top window (of the RGUI) I am able to open a new script without any error. The RGUI is not closing complete there is a blank

Re: [R] RGUI crash when opening script in XP Home enviroment

2005-08-09 Thread Knut Krueger
Knut Krueger schrieb: >If there you need any further details please ass for. > > ask for :-( AppName: rgui.exeAppVer: 2.10.50418.0ModName: r.dll ModVer: 2.10.50418.0 Offset: 77cc with regards Knut Krueger http://www.biostatistic.de

[R] rpart plot question

2005-08-09 Thread Petr Pikal
Dear all I am quite confused by rpart plotting. Here is example. set.seed(1) y <- (c(rnorm(10), rnorm(10)+2, rnorm(10)+5)) x <- c(rep(c(1,2,5), c(10,10,10)) fit <- rpart(x~y) plot(fit) text(fit) Text on first split says x < 3.5 and on the second split x < 1.5 what I understand: If x < 3.5 so y

[R] mars of degree 3?

2005-08-09 Thread Molins, Jordi
Dear list, when I execute library(mda) x1 <- rnorm(10,mean=1,sd=.12) x2 <- rnorm(10,mean=.6,sd=.12) y <- pp(x1,1)+pp(x1,1)*pp(x2,.6)+.12*rnorm(length(x1)) mymars <- mars(cbind(x1,x2),y,degree=2) mymars$cuts mymars$factor I get what I expected. Instead, when I execute x1 <- rnorm(1

[R] xvmult and green lines

2005-08-09 Thread astrzelczak
Hello, I'm performing mvpart analysis, I've chosen to interactively pick the tree (xv="pick") and to do multiple cross-validation (xvmult=10). On the plot x-val relative error=f(cp/size of the tree) there are some green lines, which didn't appear during normal cross-validation. What do they dep

[R] mars of degree 3?

2005-08-09 Thread Molins, Jordi
I have forgotten to list the definition of pp. Here it is: pp <- function(x,a) {ifelse(x>a, x-a, 0)} __ Dear list, when I execute library(mda) x1 <- rnorm(10,mean=1,sd=.12) x2 <- rnorm(10,mean=.6,sd=.12) y <- pp(x1,1)+pp(x1,1)*pp(x2,.6)+.12*rnorm(len

[R] Saving trellis output to files in scripts...

2005-08-09 Thread Jamieson Cobleigh
With much help from Chuck Cleland, I was able to get xyplot to generate the plot I wanted. I'm trying to write a script (that can be read using source("file")) to create the plots I want and save them to files. If I type the following lines into the R (in interactive mode), the correct plot gets

[R] managing large datasets with RMySQL

2005-08-09 Thread Tamas K Papp
I have a large dataset (about 1 million data points from a 68-dimensional state space, result of an MCMC simulation) which won't fit in memory. I think that the only solution for analyzing this is saving it in relational database (when generated) and then reading back only portions of this data.

[R] numeric operations w/ lists

2005-08-09 Thread Afshartous, David
Hello all, X is a list of 20 lists, and each individual list has 65 elements. Y is a list of 65 elements. WANT: subtract Y from each of the 20 lists in X. Here's what I tried and the error messages: > X - rep(Y, 20) Error in X - rep(Y 20) : non-numeric argument to binary operator I tried se

Re: [R] Saving trellis output to files in scripts...

2005-08-09 Thread Liaw, Andy
This is in the FAQ: You need to wrap any trellis calls in functions or scripts in print(). Andy > From: Jamieson Cobleigh > > With much help from Chuck Cleland, I was able to get xyplot to > generate the plot I wanted. I'm trying to write a script (that can be > read using source("file")) to c

Re: [R] numeric operations w/ lists

2005-08-09 Thread Sean Davis
On 8/9/05 12:21 PM, "Afshartous, David" <[EMAIL PROTECTED]> wrote: > > Hello all, > > X is a list of 20 lists, and each individual list has 65 elements. > > Y is a list of 65 elements. > > WANT: subtract Y from each of the 20 lists in X. > > Here's what I tried and the error messages: > >>

Re: [R] numeric operations w/ lists

2005-08-09 Thread Berton Gunter
Suggestions: 1. Read the relevant sections of "An Introduction to R" and the R language definition to learn how to work with lists. 3. ?lapply to learn how to use the apply family on lists Hint: sapply(X,"-",y=Y) The above references will tell you what these hieroglyphics mean and what you get.

[R] Adding Functionality to stat.table in Epi

2005-08-09 Thread rab45+
The stat.table function in the Epi package won't do standard deviations. It didn't seem that it would be difficult to add an "sd" function to the stat.table function. Following the example for the mean, I set up a similar function for the sd (and included it as an options) but it just won't work. (

Re: [R] Adding Functionality to stat.table in Epi

2005-08-09 Thread Greg Snow
After you copy stat.table to stat.table2 and modify stat.table2 try: > environment(stat.table2) <- environment(stat.table) (you should only need to do that 1 time after creating/editing stat.table2). hope this helps, Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Ca

[R] Digest reading is tedious

2005-08-09 Thread Trevor Hastie
Like many, I am sure, I get R-Help in digest form. Its easy enough to browse the subject lines, but then if an entry interests you, you have to embark on this tedious search or scroll to find it. It would be great to have a "clickable" digest, where the topics list is a set of pointers, and clic

Re: [R] Saving trellis output to files in scripts...

2005-08-09 Thread Jamieson Cobleigh
Thanks, that worked. I see now where it says that in the help for xyplot, however, it wasn't obvious to me before. Jamie On 8/9/05, Liaw, Andy <[EMAIL PROTECTED]> wrote: > This is in the FAQ: You need to wrap any trellis calls in functions or > scripts in print(). > > Andy > > > From: Jamieso

Re: [R] Digest reading is tedious

2005-08-09 Thread Jeff Gentry
> Like many, I am sure, I get R-Help in digest form. Its easy enough to > browse the > subject lines, but then if an entry interests you, you have to embark > on this tedious search or scroll to find it. > It would be great to have a "clickable" digest, where the topics list > is a set of pointers,

[R] how to use the function from another package

2005-08-09 Thread Peter Yang
Hi, I am trying to write a package(A) for myself and need to use a function from another package(B) which is in R already(need to install it before use). Could anyone tell me how to implement that? Also I hope that my package gives an ERROR message(something like "STOP, please install package B fir

Re: [R] Digest reading is tedious

2005-08-09 Thread A.J. Rossini
Trevor - There's a wonderful feature in gnus (the emacs information (including mail) reader), that "bursts" digests into subparts for reading (and hence, easy access). I think there are other similar tools as well for other mail readers. best, -tony On 8/9/05, Trevor Hastie <[EMAIL PROTECTED]>

Re: [R] Adding Functionality to stat.table in Epi

2005-08-09 Thread rab45+
> After you copy stat.table to stat.table2 and modify stat.table2 > try: > >> environment(stat.table2) <- environment(stat.table) > > (you should only need to do that 1 time after creating/editing > stat.table2). > > hope this helps, > > Greg Snow, Ph.D. > Statistical Data Center, LDS Hospital > In

Re: [R] how to use the function from another package

2005-08-09 Thread Tuszynski, Jaroslaw W.
See "Writing R Extensions" / Creating R package / Description file / "depends" field (section 1.1.1). Jarek \=== Jarek Tuszynski, PhD. o / \ Science Applications International Corporation <\__,| (703) 676-419

Re: [R] how to use the function from another package

2005-08-09 Thread Paul Roebuck
On Tue, 9 Aug 2005, Peter Yang wrote: > I am trying to write a package(A) for myself and need to use a > function from another package(B) which is in R already(need to install > it before use). Could anyone tell me how to implement that? Also I > hope that my package gives an ERROR message(somethi

Re: [R] Digest reading is tedious

2005-08-09 Thread Ted Harding
On 09-Aug-05 Trevor Hastie wrote: > Like many, I am sure, I get R-Help in digest form. Its easy enough > to browse the subject lines, but then if an entry interests you, > you have to embark on this tedious search or scroll to find it. > It would be great to have a "clickable" digest, where the top

Re: [R] Digest reading is tedious

2005-08-09 Thread David Whiting
A.J. Rossini wrote: > Trevor - > > There's a wonderful feature in gnus (the emacs information (including > mail) reader), that "bursts" digests into subparts for reading (and > hence, easy access). I think there are other similar tools as well for > other mail readers. If you are using linux you

Re: [R] how to use the function from another package

2005-08-09 Thread Tuszynski, Jaroslaw W.
> Thanks very much for your help. Do I still have to write library( ) to load the library in my code after I add a "depends" field in the DESCRIPTION file? No, First when user of your package downloads it (at least on Windows machines) all required packages are also downloaded (this mechanism s

Re: [R] Digest reading is tedious

2005-08-09 Thread Peter Dalgaard
Jeff Gentry <[EMAIL PROTECTED]> writes: > > Like many, I am sure, I get R-Help in digest form. Its easy enough to > > browse the > > subject lines, but then if an entry interests you, you have to embark > > on this tedious search or scroll to find it. > > It would be great to have a "clickable" di

Re: [R] Digest reading is tedious

2005-08-09 Thread Martin Maechler
> "Trevor" == Trevor Hastie <[EMAIL PROTECTED]> > on Tue, 9 Aug 2005 10:27:32 -0700 writes: Trevor> Like many, I am sure, I get R-Help in digest Trevor> form. Its easy enough to browse the subject lines, Trevor> but then if an entry interests you, you have to Trevor> em

Re: [R] connexion problem getHdata (HMisc)

2005-08-09 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: > ** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error ple

Re: [R] Reading large files in R

2005-08-09 Thread Andreas Hary
Brief correction: it should read >> van.call <- call('sqlQuery',con,query='select * from vandrivers;') rather than >> van.call <- sqlQuery(con,'select * from vandrivers;') The latter statement would load the data into memory as usual. Best wishes, Andreas - Original Message - From

[R] Password prompt for download.file from linux

2005-08-09 Thread Williams, George (gerw)
Is there any way to be prompted for a password when using a proxy server to down load files to linux. The only approach I have seen in the documentation involves putting a clear text password into an environment variable, which would get me into trouble. Thanks for the help, George Williams _

[R] RGUI crash when opening script in XP Home enviroment

2005-08-09 Thread Duncan Mackay
I can duplicate this problem under WinXP Professional 5.1.2600 Service Pack 2 Build 2600 on a Toshiba Satellite A10. Thanks to Knut for identifying just what was causing this problem - I was having this error repeatedly but couldn't track down the cause. Duncan > version _

[R] Digest reading is tedious

2005-08-09 Thread Duncan Mackay
Any prospects of getting R-news delivered as an RSS feed??? Duncan * Dr. Duncan Mackay School of Biological Sciences Flinders University GPO Box 2100 Adelaide S.A.5001 AUSTRALIA Ph (08) 8201 2627FAX (08) 8201 3015 http://www.scieng.flinders.edu.au

[R] RGUI crash when opening script in XP Home enviroment

2005-08-09 Thread Duncan Mackay
__ 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

[R] Digest reading is tedious

2005-08-09 Thread Duncan Mackay
__ 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

[R] RGUI crash when opening script in XP Home enviroment

2005-08-09 Thread Duncan Mackay
I can duplicate this problem under WinXP Professional 5.1.2600 Service Pack 2 Build 2600 on a Toshiba Satellite A10. Thanks to Knut for identifying just what was causing this problem - I was having this error repeatedly but couldn't track down the cause. Duncan > version _

[R] Digest reading is tedious

2005-08-09 Thread Duncan Mackay
Any prospects of getting R-news delivered as an RSS feed??? Duncan * Dr. Duncan Mackay School of Biological Sciences Flinders University GPO Box 2100 Adelaide S.A.5001 AUSTRALIA Ph (08) 8201 2627FAX (08) 8201 3015 http://www.scieng.flinders.edu.au

Re: [R] Digest reading is tedious

2005-08-09 Thread Dirk Eddelbuettel
On 10 August 2005 at 11:14, Duncan Mackay wrote: | Any prospects of getting R-news delivered as an RSS feed??? The R-help (!!) list is available via Gmane.org, a fabulous service that archives, redirects, displays, ... a gazillion mailing lists. Among them are are r-help, r-devel, and several r-s

[R] error loading nlme package

2005-08-09 Thread Krishna
Hi everyone The suggestion I received from Mr. Dimitris Rizopoulos and Mr. Gabor Grothendieck seems to work well. But unfortunately when I am trying to load nlme package, the following error message is generated. Please help me on this, at the earliest. > library(nlme) Error in loadNamespace(i, c

Re: [R] connexion problem getHdata (HMisc)

2005-08-09 Thread Sean O'Riordain
Could this be a web-proxy problem? http://cran.r-project.org/bin/windows/base/rw-FAQ.html#The-internet-download-functions-fail_002e Have you tried doing update.packages() ? does this work? I presume you're on some sort of Windows? Sean On 09/08/05, Frank E Harrell Jr <[EMAIL PROTECTED]> wrote