Re: [R] Creating GUIs for R

2008-10-07 Thread [Ricardo Rodriguez] Your XEN ICT Team
Oopsw! Sorry, Greg of course! Thanks! [Ricardo Rodriguez] Your XEN ICT Team wrote: Greg Snow wrote: Wade, What type of GUI do you want? Do you want a full GUI that the user runs to do everything (that uses R as the computational engine)? Look at R commander, JGR, and the R plugin for Excel

Re: [R] Creating GUIs for R

2008-10-07 Thread [Ricardo Rodriguez] Your XEN ICT Team
Greg Snow wrote: Wade, What type of GUI do you want? Do you want a full GUI that the user runs to do everything (that uses R as the computational engine)? Look at R commander, JGR, and the R plugin for Excel as possible examples. Hi Wade, I am trying to introduce some users to R without m

[R] question from Braun/Murdoch book

2008-10-07 Thread Erin Hodgess
Hi R People: I am looking at the Braun/Murdoch book, " A First Course in Statistical Programming in R", and I have a question about a function there. It's on page 52, Example 4.5; the sieve of Erastosthenes. There is a line: primes <- c() Is there a difference between using that and primes <- N

Re: [R] R and Multi threading

2008-10-07 Thread Prof Brian Ripley
On Tue, 7 Oct 2008, pejpm wrote: I will preface this message by saying that I am not an R developer and no very little about R...but here is my situation: One of my users has developed a model for analysing commodity prices. At the moment when he runs this model on his daily data set it takes

[R] Plot means with error bars - A novice needs help

2008-10-07 Thread Michael Just
Hello, I'd appreciate a suggestion on how to construct plots (barplots?) that use means on the Y axis instead of density/count. I'd also like to use groups and plot error or confidence interval bars on these graphs. I know this is a read the manual situation. I'd appreciate help with what to read,

Re: [R] Histogram colours in lattice.

2008-10-07 Thread Deepayan Sarkar
On 10/7/08, Rolf Turner <[EMAIL PROTECTED]> wrote: > > I am trying to do a histogram lattice plot and I would like the > histogram to be filled with a different colour in each panel. > > Note: I want every bar in each histogram to be the same colour, > but that there should be different colour

[R] genoud nonlinear least squares optimisation

2008-10-07 Thread Rhys Whitley
Hello, I am trying to optimise a nonlinear model to derive 'best-fit' parameter esimates using the genoud function. I have been using the genetic algorithm - gafit - in order to do this, but I am getting parameter estimates that do not always reach the global minimum. I am very keen to apply genou

Re: [R] How to validate model?

2008-10-07 Thread Frank E Harrell Jr
Ajay ohri wrote: the purpose of validating indirect measures such as ROC curves. Biggest Purpose- It is useful while in more marketing /sales meeting context ;) That is far from clear. It seems that ROC curves are being used to impress non-statisticians more than for shedding light on the

Re: [R] masking a regular lat/lon grid to extract map boundaries

2008-10-07 Thread Greg Snow
Another approach that will probably be more work up front, but may be better in the long run if you are going to be doing a lot of this is to use the maptools and sp packages. Create a spatialpointsdataframe from your data, read in a us map (there are shapefiles that you can get from the US cen

Re: [R] ordering problem

2008-10-07 Thread Moshe Olshansky
Try AA <- apply(A,1,function(x) paste(x,collapse="")) and work with AA. --- On Tue, 30/9/08, Jose Luis Aznarte M. <[EMAIL PROTECTED]> wrote: > From: Jose Luis Aznarte M. <[EMAIL PROTECTED]> > Subject: [R] ordering problem > To: [EMAIL PROTECTED] > Received: Tuesday, 30 September, 2008, 8:43 P

Re: [R] Histogram colours in lattice.

2008-10-07 Thread hadley wickham
On Tue, Oct 7, 2008 at 8:54 PM, Rolf Turner <[EMAIL PROTECTED]> wrote: > > I am trying to do a histogram lattice plot and I would like the > histogram to be filled with a different colour in each panel. > > Note: I want every bar in each histogram to be the same colour, > but that there should be

[R] Histogram colours in lattice.

2008-10-07 Thread Rolf Turner
I am trying to do a histogram lattice plot and I would like the histogram to be filled with a different colour in each panel. Note: I want every bar in each histogram to be the same colour, but that there should be different colours *between* histograms. Can't seem to get this to work. I thou

[R] help to debug C codes called from R

2008-10-07 Thread Droit Arnaud
Hello everybody, I have a package with a C codes called from R. I want to debug the C functions to check variables values and to include some breakpoints in the C codes. I am wondering if anyone knows of any tools to easily help debug in the R environment. Thank you very much for your help.

Re: [R] How to validate model?

2008-10-07 Thread Wensui Liu
generally speaking, there are 2 types of validation, out of sample and out of time. it is hard to tell if 5000 is enough or not. how many 1s and 0s in 5000? i am just curious. how could you be asked to do something that you have no idea? On Tue, Oct 7, 2008 at 8:22 AM, Maithili Shiva <[EMAIL PRO

Re: [R] Factor tutorial?

2008-10-07 Thread Ted Harding
On 07-Oct-08 22:23:22, Bert Gunter wrote: > But it **is** indexed in both of V&R's MASS and S Programming. > I have no idea whether the info there will be helpful to you, > of course. I would find (and have found) it so. > -- Bert Gunter The discussion of factors in V&R is certainly quite comprehe

Re: [R] How to validate model?

2008-10-07 Thread Pedro.Rodriguez
Hi, Yes, from my humble opinion, it doesnt make any sense to use the (2-class) ROC curve for a rating system. For example, if the classifier predicts 100% for all the defaulted exposures and 0% for the good clients, then even though we have a perfect classifier we have a bad rating system. Ho

[R] follow up on "[Rd] NAMESPACE & methods guidance, please" ( http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html )

2008-10-07 Thread Tao Shi
This is a follow-up on the discussion originally posted on the R-devel list ( http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html ), as I have encountered the exact same issue mentioned in Martin's email. Here is a simplified version of my problem: ##=

[R] Fortune?

2008-10-07 Thread Rolf Turner
Ben Bolker wrote (to the r-sig-mixed-models list): I still don't know what to do about the compromise between how statistics should be done and how journal editors seem to insist it should be done ... This seems to me to be worthy of being included as a fortune.

Re: [R] How to validate model?

2008-10-07 Thread Ajay ohri
the purpose of validating indirect measures such as ROC curves. Biggest Purpose- It is useful while in more marketing /sales meeting context ;) Also , Deciles specific performance is easy to explain and monitor for faster execution/re modeling. Regards, Ajay On Wed, Oct 8, 2008 at 4:01 AM, Fr

Re: [R] R and computer heat

2008-10-07 Thread Alexandre Aguiar
Em Terça 07 Out 2008, Dr Eberhard Lisse escreveu: > Why don't you hack a little script that looks at system load, > temperature and date/time and writes it somewhere. Then Done! Columns are time, % of cpu usage and cpu temp in Celsius degrees. The R script used was complete in about 2 min 10 sec a

Re: [R] masking a regular lat/lon grid to extract map boundaries

2008-10-07 Thread Duncan Murdoch
On 07/10/2008 6:08 PM, claudia tebaldi wrote: Dear R-helpers, I have lat/lon coordinates of regularly spaced grid points, about 4Km apart, covering the entire US continental region. I would like to mask this rectangular grid in order to extract all and only the grid points within a specific regi

Re: [R] How to validate model?

2008-10-07 Thread Frank E Harrell Jr
Ajay ohri wrote: This is an approach Run the model variables on hold out sample. Check and compare ROC curves between build and validation datasets. Check for changes in parameter estimates (co efficients of variables) p value and signs. Check for binning (response versus deciles of individ

Re: [R] Factor tutorial?

2008-10-07 Thread Bert Gunter
But it **is** indexed in both of V&R's MASS and S Programming. I have no idea whether the info there will be helpful to you, of course. I would find (and have found) it so. -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]

Re: [R] How to validate model?

2008-10-07 Thread Ajay ohri
This is an approach Run the model variables on hold out sample. Check and compare ROC curves between build and validation datasets. Check for changes in parameter estimates (co efficients of variables) p value and signs. Check for binning (response versus deciles of individual variables). Chec

[R] masking a regular lat/lon grid to extract map boundaries

2008-10-07 Thread claudia tebaldi
Dear R-helpers, I have lat/lon coordinates of regularly spaced grid points, about 4Km apart, covering the entire US continental region. I would like to mask this rectangular grid in order to extract all and only the grid points within a specific region. Today I want to extract Montana, say, from

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Rodrigo Aluizio
Exactly. It's solved. Just remove #15. CAPpotiFTI<-CAPpotiFT for(i in c(2:8))CAPpotiFTI$CCA[[i]][,1]<-CAPpotiFTI$CCA[[i]][,1]*-1 It seems that I've to pay more attention and study more about R language. Thanks a lot once more. Rodrigo. -- From:

Re: [R] lme and lmer df's and F-statistics again

2008-10-07 Thread Bert Gunter
>> Well, writing on my rebuttal, I find myself being unable to explain in a >> few, easy to understand (and, at the same time, correct) sentences stating >> that it is not a good idea to report (most likely wrong) dfs and F >> statistics. Without pretending to be able to discuss the details, may

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Mark Difford
Hi Rodrigo, This is because [I now see] you are working on a capscale object, not a cca object, which is what I thought you were using. It still works, though, even with c(2:8,15), though DF #15 doesn't exist in capscale objects. To show you that this is so, run the example below, which uses a da

Re: [R] Ecological Niche Modelling on R

2008-10-07 Thread Ben Bolker
stephen sefick gmail.com> writes: > > that is a pretty big question. And I am not qualified to answer it, > but my suggestion- from figuring out how to use other things- is to > find out how other people have modeled ecological niches- not > necessarily with R, and then try and find out functi

[R] Factor tutorial?

2008-10-07 Thread rkevinburton
This is probably a very basic question. I want to understand factors but I am not sure where to turn. Looking up factor in the Chambers book doesn't even show up in the index. Maybe I am just slow but ?factor doesn't help either. Would someone please point me to a very basic tutorial where I can

Re: [R] Multiple hist(ograms) - One plot

2008-10-07 Thread Michael Just
Thierry, Thanks. This worked. Cheers, Michael On Fri, Oct 3, 2008 at 2:46 AM, ONKELINX, Thierry <[EMAIL PROTECTED]>wrote: > Michael, > > You get this error because you make the subset at the wrong place. Try > > p <- ggplot(dat[dat$sc_recov %in% c(21,31,41), ], aes(x=bbContag, > y=..density..))

Re: [R] Multiple hist(ograms) - One plot

2008-10-07 Thread Michael Just
Deepayan, Thanks for the advice. -Micahel On Fri, Oct 3, 2008 at 1:24 AM, Deepayan Sarkar <[EMAIL PROTECTED]>wrote: > On 10/2/08, Michael Just <[EMAIL PROTECTED]> wrote: > > Dieter and Thierry: > > > > Per you suggestions I have tried: > > > > ggplot2 from Thierry: > > > > > p <- ggplot(dat, a

Re: [R] vectorized sub, gsub, grep, etc.

2008-10-07 Thread Christos Hatzis
John, Try the following: > mapply(function(p, r, x) sub(p, r, x, fixed = TRUE), p=patt, r=repl, x=X) b cda "aB" "CD" "ef" -Christos > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Thaden, John J > Sent: Tuesday, October 07, 2008 3:59 P

Re: [R] vectorized sub, gsub, grep, etc.

2008-10-07 Thread N. Lapidus
Hi John, Wouldn't you get the same with just mapply(sub, patt, repl, X) ? Nael On Tue, Oct 7, 2008 at 9:58 PM, Thaden, John J <[EMAIL PROTECTED]> wrote: > R pattern-matching and replacement functions are > vectorized: they can operate on vectors of targets. > However, they can only use one pat

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Rodrigo Aluizio
Well this time I have to assume, I'm not understanding what is wrong now. And I have to say: 'Thank You for your patience', cause I'm going crazy here! :-) Mark, I tried this: CAPpotiFTI<-CAPpotiFT for(i in c(2:8,15)) CAPpotiFTI$CCA[[i]][, 1]<-CAPpotiFTI$CCA[[i]][, 1] * -1 and got this: Erro

[R] vectorized sub, gsub, grep, etc.

2008-10-07 Thread Thaden, John J
R pattern-matching and replacement functions are vectorized: they can operate on vectors of targets. However, they can only use one pattern and replacement. Here is code to apply a different pattern and replacement for every target. My question: can it be done better? sub2 <- function(pattern, re

Re: [R] lme and lmer df's and F-statistics again

2008-10-07 Thread Kingsford Jones
You may find this site useful: http://lme4.r-forge.r-project.org/bib/lme4bib.html On Tue, Oct 7, 2008 at 9:08 AM, Dieter Menne <[EMAIL PROTECTED]> wrote: > Julia S. gmail.com> writes: > >> Now, I did that in my article and I got a response from a reviewer that I >> additionally should give the

Re: [R] panel.groups: use group.number to define colors

2008-10-07 Thread baptiste auguie
Many thanks, I think I got the spirit of 'capturing and overriding' the arguments which was the bit i was missing. It's much clearer now with a working example. Thanks again, baptiste On 7 Oct 2008, at 21:19, Deepayan Sarkar wrote: On Tue, Oct 7, 2008 at 8:54 AM, baptiste auguie <[EMAIL P

Re: [R] Mac crash- Probably memory problem

2008-10-07 Thread stephen sefick
not reproducible. On Tue, Oct 7, 2008 at 11:35 AM, dimitris kapetanakis <[EMAIL PROTECTED]> wrote: > > Dear all, > > I am running a code using bootstraps for estimating standard errors but the > mac crashes. When I use small number of bootstraps (100) it works fine but > if I increase that number

Re: [R] panel.groups: use group.number to define colors

2008-10-07 Thread Deepayan Sarkar
On Tue, Oct 7, 2008 at 8:54 AM, baptiste auguie <[EMAIL PROTECTED]> wrote: > Dear list, > > > I've been trying this for a few hours and I just don't understand how > lattice works with groups and subscripts. > > Consider the following example, > > > >> xx <- seq(1, 10, length=100) >> x <- rep(xx, 4

Re: [R] Ecological Niche Modelling on R

2008-10-07 Thread stephen sefick
that is a pretty big question. And I am not qualified to answer it, but my suggestion- from figuring out how to use other things- is to find out how other people have modeled ecological niches- not necessarily with R, and then try and find out functions that preform the pieces or the whole analys

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Mark Difford
Hi Rodrigo, Yes it does, but this will work. You have erroneously used a "," in your call, it should be a ".", if anything. You have also inserted "cca"... And the axes being switched must be conformant: >> CAPpotiFTI<-CAPpotiFT >> for(i in c(2:8,15)) >> CAPpotiFTI$CCA[[i]][,2]<-CAPpotiFTI,cca$C

Re: [R] How to validate model?

2008-10-07 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: Hi Frank, Thanks for your feedback! But I think we are talking about two different things. 1) Validation: The generalization performance of the classifier. See, for example, "Studies on the Validation of Internal Rating Systems" by BIS. I didn't think the desire was

[R] RBloomberg - Converting international stock prices into $US

2008-10-07 Thread Lapushin, Dan
To all: I'm using RBloomberg to pull historical equity prices across a range of international markets. Bloomberg defaults to returning stock prices to R in local currency, for example, blpGetData(conn, "ALUA AR Equity", "PX_LAST",start="09/30/08", end="09/30/08") returns a stock price in Argen

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Rodrigo Aluizio
Sorry for the mistake, I'm trying to rotate the CAP 1 axis not 2! Ah well, I tried the this other way, but it gave me an error. Something in the syntax, I tried to change something but didn't fix the error. CAPpotiFTI<-CAPpotiFT for(i in c(2:8,15)) CAPpotiFTI$CCA[[i]][,2]<-CAPpotiFTI,cca$CCA[[i

Re: [R] weighted quantiles

2008-10-07 Thread Brian S Cade
Try the linear quantile regression function rq() in the quantreg package. For 1 sample estimates, your model would have just an intercept term. There is a weight argument. quantiles.out <- rq(y ~ 1, data=mydata, tau=1:9/10, weight=myweights) would yield the 0.10, 0.20, ..., 0.80, 0.90 weighted

Re: [R] sort a list?

2008-10-07 Thread repkakala Gazeta.pl
There was discussion about language desing here recently -- other languages are aparently badly designed. They: 1. Allow you to sort lists, which is bad idea. 2. Probably use name like 'sort.list' for that purpose, which is even worse idea. 3. Do not respond 'error: have you called sort on a list'

Re: [R] read.spss: variable.labels

2008-10-07 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: Hi, how can I attach variable labels originally read by read.spss() to the resulting variables? X <- read.spss('data.sav', use.value.labels = TRUE, to.data.frame = TRUE, trim.factor.names = TRUE, trim_values = TRUE, reencode = "UTF-8") names(X) <- tolower(names(X))

Re: [R] weighted quantiles

2008-10-07 Thread Frank E Harrell Jr
sj wrote: I have a set of values and their corresponding weights. I can use the function weighted.mean to calculate the weighted mean, I would like to be able to similarly calculate the weighted median and quantiles? Is there a function in R that can do this? thanks, Spencer library(Hmisc) ?

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Mark Difford
Hi Rodrigo, Again an error, as that doesn't touch one of the data structures. You need to extend the range to include #15, as below: ## This does axis 2 mynew.cca <- my.cca for (i in c(2:8,15)) mynew.cca$CCA[[i]][, 2] <- mynew,cca$CCA[[i]][, 2] * -1 Cheers, Mark. Mark Difford wrote: > > Hi R

[R] Similarity Percentage Analysis

2008-10-07 Thread Rodrigo Aluizio
Just as a curiosity. Is there on R any function able to run a SimPer (Similarity Percentage Analysis)? It's an analysis of the Primer software. I guess, but I'm not sure! I was looking for it on CRAN, but I didn't found anything. ___ MSc. Rodrigo Aluizio Centro de

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Mark Difford
Hi Rodrigo, I looked through my scripts and found my old hack. __WARNING__: Be very careful to check that the mirror isn't broken and that all is in order! Make sure that you are reversing the axes you want. In your original post you mention axis 2, i.e. y-axis. Below you have used axis 1. ## Th

Re: [R] Programing and writing function help

2008-10-07 Thread jim holtman
Here is one way that might work for you: > x <- c(20,18, 45, 16, 47, 47, 15, 26, 14,14,12,16,35,27,18,94,16,26,26,30) > # create a matrix of pairs > matrix(sample(x), ncol=2) [,1] [,2] [1,] 14 16 [2,] 27 20 [3,] 26 16 [4,] 47 15 [5,] 35 47 [6,] 16 18 [7,] 14

[R] weighted quantiles

2008-10-07 Thread sj
I have a set of values and their corresponding weights. I can use the function weighted.mean to calculate the weighted mean, I would like to be able to similarly calculate the weighted median and quantiles? Is there a function in R that can do this? thanks, Spencer [[alternative HTML ve

Re: [R] t.test() on a list

2008-10-07 Thread Gang Chen
Thanks a lot, Petr! This works perfect! myList was actually a list of data.frame, and the command line initially choked. But once I converted it to matrix, it worked like a charm: apply(do.call(rbind, lapply(lapply(myList, as.matrix), c)), 2, t.test) Thanks, Gang On Mon, Oct 6, 2008 at 9:42 AM

Re: [R] panel.groups: use group.number to define colors

2008-10-07 Thread baptiste auguie
Hi, and thanks for your email, I realise my example was not very good. The actual dataset I'm trying to plot is rather big and this oversimplified example did not make much sense. I actually do need to color different subsets of the data differently in each panel, that's why I thought of

Re: [R] Load a program at the front end

2008-10-07 Thread Duncan Murdoch
On 10/7/2008 12:23 PM, Gang Chen wrote: Thanks a lot for the suggestion! Unfortunately " R --no-save < prog.R" does not work well with my situation because prog.R contain lines such as readline() and () that require user response in the middle of the execution. I also tried other options such as

Re: [R] Statistically significant in linear and non-linear model

2008-10-07 Thread Ted Harding
On 07-Oct-08 17:46:52, Hsiao-nan Cheung wrote: > Hi, > I have a question to ask. if in a linear regression model, the > independent variables are not statistically significant, is it > necessary to test these variables in a non-linear model? > Since most of non-linear form of a variable can be repr

Re: [R] Load a program at the front end

2008-10-07 Thread Scionforbai
Is Rscript what you want? http://stat.ethz.ch/R-manual/R-patched/library/utils/html/Rscript.html >From the docs I can't see if it allows interactivity (also through tcl/tk). Still, give a look. ScionForbai __ R-help@r-project.org mailing list https://

Re: [R] Creating GUIs for R

2008-10-07 Thread Gabor Grothendieck
I think prior posters addressed that or maybe what you really want is a command that accepts your function and automatically constructs a GUI front end for it. In that case see ggenericwidget in the gWidgets package and the fgui package. You don't need VB at all for this. On Tue, Oct 7, 2008 at

Re: [R] Statistically significant in linear and non-linear model

2008-10-07 Thread Greg Snow
Well here is one example where x is not significant in a linear regression: > x <- seq( -1,1, 0.1 ) > y <- x^2 + rnorm(21,0,.1) > summary(lm(y~x)) Would you really want to dismiss any relationship (non-linear) between x and y based on the above p-value? -- Gregory (Greg) L. Snow Ph.D. Statistic

Re: [R] Load a program at the front end

2008-10-07 Thread Gang Chen
Thanks for the suggestion, Luke! Your approach would load prog.R whenever invoking R, but that is not exactly what I want. Basically I can run prog.R through source("~/someDir/prog.R") inside R. Also since prog.R involves many lines of readline() and tclvalue() in tcltk package, the program requir

[R] Programing and writing function help

2008-10-07 Thread Stephen Cole
Hello R users My goal is to use R to write functions for and automate a series of analyses i would like to do on a large data set. The calculations are not very difficult in themselves, however they will be very time consuming (Plus I think R will be extremely useful and this is another excuse to

Re: [R] sort a list?

2008-10-07 Thread rkevinburton
THank you. I just didn't know the "rules". In other languages it is possible to pass in a 'compare' function so the sort is defined by the function. I guess I was a) wondering why it failed, and b) if there was a similar work around to sort generic lists. Also I was specifically addressing the l

[R] Statistically significant in linear and non-linear model

2008-10-07 Thread Hsiao-nan Cheung
Hi, I have a question to ask. if in a linear regression model, the independent variables are not statistically significant, is it necessary to test these variables in a non-linear model? Since most of non-linear form of a variable can be represented to a linear combination using Taylor's theore

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Rodrigo Aluizio
Ok Mark, it worked for the species. I still get an error if I try with biplot (cn,sp), but it's not a problem, repositioning the species is enough. Thanks once again. Just for future consults the error that still remains: CAPpotiFTI<-scores(CAPpotiFT, display=c('bp','species','cn','sites') CAPp

Re: [R] vectorization of a loop for mahalanobis distance calculation

2008-10-07 Thread Frank Hedler
Dear all,we just realized something. Sarah's distance function - indeed - calculates mahalanobis distance very well. However, it uses the observed variance-covariance matrix by default. What we actually need (sorry for not stating it clearly in to be able to specify which variance-covariance matrix

Re: [R] Creating GUIs for R

2008-10-07 Thread Wade Wall
Sorry that my post wasn't very clear. What I am wanting to do is learn to build some simple GUIs for a limited number of functions. Basically, I am envisioning a screen with check boxes, a drop down menu etc. that users could select to run analyses on imported data. I have worked with VB before,

Re: [R] panel.groups: use group.number to define colors

2008-10-07 Thread Bert Gunter
Not exactly sure what you want to do, but ... In your example, you do not need groups, since the color doesn't change within the levels of the conditioning variable (fact). Hence you can use the panel.number() function to choose the plotting color of each panel, like this: ## .. continuing with y

Re: [R] Creating GUIs for R

2008-10-07 Thread Bert Gunter
Seek and ye shall find ... Check the RGUI's link on the "other" web page on CRAN. If you are on Windows, there is some simple built-in GUI functionality. ?winMenuAdd, ?select.list and the links therein will get you started there. Cheers, Bert Gunter -Original Message- From: [EMAIL PROTEC

Re: [R] R squared value for a line on a plot

2008-10-07 Thread Dieter Menne
Georgina Sarah Humphreys research.gla.ac.uk> writes: > > Does anyone know how to retrieve the R squared value for a line on a graph? The balloon rule http://www.jstor.org/pss/2683562 Dieter __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] Creating GUIs for R

2008-10-07 Thread Greg Snow
Wade, What type of GUI do you want? Do you want a full GUI that the user runs to do everything (that uses R as the computational engine)? Look at R commander, JGR, and the R plugin for Excel as possible examples. Are you more interested in a simple GUI for one specific plot or function to ru

Re: [R] vectorization of a loop for mahalanobis distance calculation

2008-10-07 Thread Sarah Goslee
Hi Frank, If the way distance() calculates the Mahalanobis distance meets your needs other than the covariance specification, you can tweak that _very_ easily. If you use fix(distance) at the command line, you can edit the source. change the first line to: function (x, method = "euclidean", icov)

Re: [R] R squared value for a line on a plot

2008-10-07 Thread Ben Bolker
Georgina Sarah Humphreys research.gla.ac.uk> writes: > > Does anyone know how to retrieve the R squared value for a line on a graph? > > Thanks > Georgina > We need a LOT more information to answer your question ... please read the posting guide and tell us in a bit more detail what you're

Re: [R] sort a list?

2008-10-07 Thread Erik Iverson
Since objects of class "list" in R can be made up of heterogeneous objects, sorting them does not make much sense. For example, does "A", come before or after 1000, does a linear model summary come before or after pi? If your data are all numeric, store them as a numeric vector, where sort w

[R] Creating GUIs for R

2008-10-07 Thread Wade Wall
Hi all, I have looked around for help on creating GUIs for R, but haven't found anything. I would be interested in any advice or webpages that have information on the best language, tutorials etc. for creating simple GUIs. Mainly I want to do this as a heuristic exercise. Thanks for any help. W

Re: [R] sort a list?

2008-10-07 Thread jim holtman
Exactly what were your expections from sorting the list? What did you expect the answer to look like? You can 'unlist' the list and then sort the elements: > x[["A"]] <- 1:10 > x[["B"]] <- 4:12 > sort(unlist(x)) A1 A2 A3 A4 B1 A5 B2 A6 B3 A7 B4 A8 B5 A9 B6 A10 B7 B8 B9 1 2

Re: [R] sort a list?

2008-10-07 Thread Henrique Dallazuanna
Try this: x[order(unlist(x), decreasing = TRUE)] On Tue, Oct 7, 2008 at 1:28 PM, <[EMAIL PROTECTED]> wrote: > I am trying to sort a list and the data is obiously not in the right format. > I am trying: > > x <- list() > x[["A"]] <- 1 > x[["B"]] <- 2 > > order(x) > > But am getting: > > Error i

Re: [R] Extracting text from html code using the RCurl package.

2008-10-07 Thread Gabor Grothendieck
I gather you are using Windows and in that case you could use RDCOMClient or rcom to get it via Internet Explorer, e.g. library(RDCOMClient) ie <- COMCreate("InternetExplorer.Application") URL <- "https://stat.ethz.ch/mailman/listinfo/r-help"; ie$Navigate(URL) while(ie[["Busy"]]) Sys.sleep(1) txt

[R] Ecological Niche Modelling on R

2008-10-07 Thread milton ruser
Dear all, I have strong interest on Ecological Niche Model, which in general use a set of environmental variables (continuous, categorical etc) and Presence (or Presense/Absence) records for species. I think that "grasp" and "adehabitat" packages could help me on these tasks. My input layers are on

Re: [R] vectorization of a loop for mahalanobis distance calculation

2008-10-07 Thread Sarah Goslee
distance() from the ecodist package will calculate Mahalanobis distances. Sarah -- Sarah Goslee http://www.functionaldiversity.org __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:

Re: [R] Load a program at the front end

2008-10-07 Thread Luke Tierney
Something like env R_PROFILE=prog.R R may work for you. You may need to call .First.sys at the beginning of prog.R to get default packages loaded. luke On Tue, 7 Oct 2008, Gang Chen wrote: Thanks a lot for the suggestion! Unfortunately " R --no-save < prog.R" does not work well with my

[R] R and Multi threading

2008-10-07 Thread pejpm
I will preface this message by saying that I am not an R developer and no very little about R...but here is my situation: One of my users has developed a model for analysing commodity prices. At the moment when he runs this model on his daily data set it takes roughly 5 hours to complete. He is u

[R] Algorithm = "port" convergence codes

2008-10-07 Thread Nakamura
Hello all, I am fitting a Gamma distribution to some data I have using nls(). The function obviously runs into issues when using a 0 as a parameter value. I understand the line alg = "port" can be used to set the lower bounds to prevent this from happening. When I run the code I get the following

[R] vectorization of a loop for mahalanobis distance calculation

2008-10-07 Thread Frank Hedler
Dear all, We have a data frame x with n people as rows and k variables as columns. Now, for each person (i.e., each row) we want to calculate a distance between him/her and EACH other person in x. In other words, we want to create a n x n matrix with distances (with zeros in the diagonal). Howeve

[R] R squared value for a line on a plot

2008-10-07 Thread Georgina Sarah Humphreys
Does anyone know how to retrieve the R squared value for a line on a graph? Thanks Georgina __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html an

[R] sort a list?

2008-10-07 Thread rkevinburton
I am trying to sort a list and the data is obiously not in the right format. I am trying: x <- list() x[["A"]] <- 1 x[["B"]] <- 2 order(x) But am getting: Error in order(x) : unimplemented type 'list' in 'orderVector1' How should I change the list so that it can be sorted? What kinds of objec

Re: [R] Load a program at the front end

2008-10-07 Thread Gang Chen
Thanks a lot for the suggestion! Unfortunately " R --no-save < prog.R" does not work well with my situation because prog.R contain lines such as readline() and () that require user response in the middle of the execution. I also tried other options such as "R -f prog.R" and "R --interactive < prog

Re: [R] Extracting text from html code using the RCurl package.

2008-10-07 Thread Martin Morgan
Hi Tony -- Tony Breyal <[EMAIL PROTECTED]> writes: > Dear R-help, > > I want to download the text from a web page, however what i end up > with is the html code. Is there some option that i am missing in the > RCurl package? Or is there another way to achieve this? This is the > code i am using:

Re: [R] using assign with lists

2008-10-07 Thread jim holtman
Here is something to try: > result <- list() > for (i in 1:2){ + for (j in 1:2){ + result[[paste(i, j, sep="|")]] <- rep(i,j) + } + } > > result $`1|1` [1] 1 $`1|2` [1] 1 1 $`2|1` [1] 2 $`2|2` [1] 2 2 On Tue, Oct 7, 2008 at 11:01 AM, Mark Kimpel <[EMAIL PROTECTED]> wrote: > I

Re: [R] horizontal boxplot + xlim

2008-10-07 Thread Ben Bolker
Antje yahoo.de> writes: > I get a strange behaviour of a boxplot with the following code. There seems > to > be a problem with the xlim-parameter. Did I do anything wrong? What else can > I > do to force the boxplot to have a defined x-range? > > x <- rnorm(100) > boxplot(x, notch=TRUE, xla

[R] panel.groups: use group.number to define colors

2008-10-07 Thread baptiste auguie
Dear list, I've been trying this for a few hours and I just don't understand how lattice works with groups and subscripts. Consider the following example, xx <- seq(1, 10, length=100) x <- rep(xx, 4) y <- c(cos(xx), sin(xx), xx, xx^2/10) fact <- factor(rep(c("cos", "sin", "id", "square")

[R] Mac crash- Probably memory problem

2008-10-07 Thread dimitris kapetanakis
Dear all, I am running a code using bootstraps for estimating standard errors but the mac crashes. When I use small number of bootstraps (100) it works fine but if I increase that number it crashes. Thanks in advance dimitris The code, the error and my mac characteristics are the following:

Re: [R] R and computer heat

2008-10-07 Thread Dr Eberhard Lisse
Lpatops are not for heavy lifting, they are Toys for the Boys. I run the .NA country code Top Level Domain Name Registry which is Java based. It supports an API called EPP and I have of course a clone on my MacBook (and on the Sexy Little Number :-)-O). I tested the EPP by writing a loop registeri

Re: [R] Mirror Image on Biplot Graphic

2008-10-07 Thread Mark Difford
Hi Rodrigo, Sorry again: the structure vegan uses is quite complex. Technically you should use the extractor function scores() to extract what you want from the object, e.g. scores(my.cca, display="species") or scores(my.cca, display="cn") [centroids]. I did work out a quicker way of reversing ax

Re: [R] How to validate model?

2008-10-07 Thread Pedro.Rodriguez
Hi Frank, Thanks for your feedback! But I think we are talking about two different things. 1) Validation: The generalization performance of the classifier. See, for example, "Studies on the Validation of Internal Rating Systems" by BIS. 2) Calibration: Correct calibration of a PD rating system

[R] read.spss: variable.labels

2008-10-07 Thread soeren . vogel
Hi, how can I attach variable labels originally read by read.spss() to the resulting variables? X <- read.spss('data.sav', use.value.labels = TRUE, to.data.frame = TRUE, trim.factor.names = TRUE, trim_values = TRUE, reencode = "UTF-8") names(X) <- tolower(names(X)) attach(X) Thank you

Re: [R] lme and lmer df's and F-statistics again

2008-10-07 Thread Dieter Menne
Julia S. gmail.com> writes: > Now, I did that in my article and I got a response from a reviewer that I > additionally should give the degrees of freedom, and the F-statistics. From > what I read here, that would be incorrect to do, and I sort of intuitively > also understand why (at least I thin

Re: [R] How to validate model?

2008-10-07 Thread Frank E Harrell Jr
[EMAIL PROTECTED] wrote: Usually one validates scorecards with the ROC curve, Pietra Index, KS test, etc. You may be interested in the WP 14 from BIS (www.bis.org). Regards, Pedro No, the validation should be done using an absolute reliability (calibration) curve. You need to verify that at

[R] using assign with lists

2008-10-07 Thread Mark Kimpel
I am performing many permutations on a data-set with each permutation producing a variable number of results. I thought that the best way to keep track of all this in one object would be with a list ('res.lst'). To address these variable results for each permutation I attempted to construct this li

  1   2   >