Re: [R] is there a formatted output in R?

2006-03-12 Thread Robert Duval
Dear Andy and Michael, Please stick to the posting guide of this list... i.e. Be tolerant. Rudeness is never warranted, but sometimes `read the manual' is the appropriate response. Don't waste time discussing such matters on the list. Robert Duval On 3/11/06, Liaw, Andy [EMAIL PROTECTED]

[R] tapply with unequal length of arguments

2006-03-12 Thread Stefanie von Felten, IPWIfU
Hi everyone, Is it possible to use tapply(x,y,mean) if not all groups of x by y are of the same length (for example if you have one missing observation)? I tried tapply(x,y,mean,na.omit=T) but it doesn't work! Steffi -- - Stefanie von Felten Doktorandin ETH

[R] how to load files from a directory?

2006-03-12 Thread Arnau Mir
Hello. I have a lot of files that contain tables of data in a directory. I want to do the following in R but I don't know how: for i in 1 to the number of files { table[i]=read.table(file=file i) } The dimension of each table is different. All of these are tables of two dimensions. My first

[R] meta / lme

2006-03-12 Thread Stephen
Hi I'm conducing a meta-analysis using the meta package. Here's a bit of code that works fine - tmp - metacont(samplesize.2, pctdropout.2, sddropout.2, samplesize.1, pctdropout.1, sddropout.1, data=Dataset, sm=WMD) I would now like to control for a couple of variables

[R] boosting for multi-class classification

2006-03-12 Thread Simon Knapp
Hi List, I can't seem to find a package that implements boosting for multi-class classification. Does such a package exist? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] how to load files from a directory?

2006-03-12 Thread Simon Knapp
file.names - c(table1, table2) #using fully qualified names table.list - list() i - 0 for(table.name in table.names) { i - i+1 table.list[[i]] - read.table(table.name) } Note the double sqare brackets. Use them also when accessing elements to have them returned as data.frames (single

[R] Misalignment of secondary axis on boxplot

2006-03-12 Thread s . e . roberts
Dear R-help, I am trying to overlay a secondary y-axis over a boxplot. The problem is that the point of the line does not correspond to the centrepoint of the boxplot, which makes presentation and interpretation sloppy. Could someone point out where I am going wrong please? #DATA

Re: [R] nls start values

2006-03-12 Thread Sundar Dorai-Raj
Wouldn't this be easier? vals - 1:100 names(vals) - sprintf(beta%d, 1:100) ## or ## names(vals) - paste(beta, 1:100, sep = ) --sundar Cal Stats wrote: Hi.. here is an example ss-NULL vals-1:100 for(i in 1:100){ ss-c(ss,paste(beta,i,=,vals[i],sep=)) }

Re: [R] Analyze Fmri package

2006-03-12 Thread Uwe Ligges
Seungshin Rhee wrote: Hi, Can you please help me? Whenever I try to run f.ica.fmri.gui(), R crashes. In the GUI, I selected an *.img file and I checked the 'Create mask' box and I typed a name for the object and then I press 'Start' button. Then in the R Console window it said

Re: [R] tapply with unequal length of arguments

2006-03-12 Thread ronggui
2006/3/12, Stefanie von Felten, IPWIfU [EMAIL PROTECTED]: Hi everyone, Is it possible to use tapply(x,y,mean) if not all groups of x by y are of the same length (for example if you have one missing observation)? Yes,It works. I tried tapply(x,y,mean,na.omit=T) but it doesn't work! What does

Re: [R] Misalignment of secondary axis on boxplot

2006-03-12 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Dear R-help, I am trying to overlay a secondary y-axis over a boxplot. The problem is that the point of the line does not correspond to the centrepoint of the boxplot, which makes presentation and interpretation sloppy. Could someone point out where I am going

Re: [R] tapply with unequal length of arguments

2006-03-12 Thread Uwe Ligges
Stefanie von Felten, IPWIfU wrote: Hi everyone, Is it possible to use tapply(x,y,mean) if not all groups of x by y are of the same length (for example if you have one missing observation)? I tried tapply(x,y,mean,na.omit=T) but it doesn't work! See ?tapply which tells you that the

[R] help! installing R on Mac OS X 10.3.9

2006-03-12 Thread Zepu Zhang
Question 1: install R..dmg How can I install R in ~/Applications and Rframework in ~/Library, instead of / Library? My preferred behavior is that if I choose /Applications for the app, framework goes into /Library; if I choose ~/Applications, libraries go into ~/Library (and don't ask me root

Re: [R] Misalignment of secondary axis on boxplot

2006-03-12 Thread s . e . roberts
Dear Uwe, Thankyou for your response. I tried lines(), without success. I have ammended the #DATA. so it should work now: #R-help example f-factor(c(MKF, DRCH, TNC, HMB, MKF, TNC, MTN, WLB, HMB, SVR, MKF, DRCH, TNC, MTN, WLB, HMB, SVR, MKF, DRCH, TNC, WLB, HMB, SVR, MKF,

[R] Numerical Derivatives in R

2006-03-12 Thread Tolga Uzuner
Hi, Suppose I have an arbitrary function: arbfun-function(x) {...} Is there a robust implementation of a numerical derivative routine in R which I can use to take it's derivative ? Something a bit more than simple division by delta of the difference of evaluating the function at x and

Re: [R] Misalignment of secondary axis on boxplot

2006-03-12 Thread Uwe Ligges
Ah, I see. This is not that easy, I'd try something like: par(lend=1) bp - boxplot(g~f,ylab=,xlab=,main=) pu - par(usr) temp - 0.05*diff(range(s.f)) par(usr = c(pu[1:2], min(s.f)-temp, max(s.f)+temp)) lines(s.f,type=b,pch=19) axis(4) Uwe Ligges [EMAIL PROTECTED] wrote: Dear Uwe, Thankyou

Re: [R] Misalignment of secondary axis on boxplot

2006-03-12 Thread s . e . roberts
Dear Uwe, That is fantastic, thankyou. Sion. Quoting Uwe Ligges [EMAIL PROTECTED]: Ah, I see. This is not that easy, I'd try something like: par(lend=1) bp - boxplot(g~f,ylab=,xlab=,main=) pu - par(usr) temp - 0.05*diff(range(s.f)) par(usr = c(pu[1:2], min(s.f)-temp, max(s.f)+temp))

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Gray Calhoun
Tolga, Look at numericDeriv. arbfun - function(x) x^2 x - 3 numericDeriv(quote(arbfun(x)), x) [1] 9 attr(,gradient) [,1] [1,]6 --Gray On 3/12/06, Tolga Uzuner [EMAIL PROTECTED] wrote: Hi, Suppose I have an arbitrary function: arbfun-function(x) {...} Is there a robust

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Tolga Uzuner
Thanks Gray, Tolga Gray Calhoun wrote: Tolga, Look at numericDeriv. arbfun - function(x) x^2 x - 3 numericDeriv(quote(arbfun(x)), x) [1] 9 attr(,gradient) [,1] [1,]6 --Gray On 3/12/06, Tolga Uzuner [EMAIL PROTECTED] wrote: Hi, Suppose I have an arbitrary function:

Re: [R] is there a formatted output in R? [User functions]

2006-03-12 Thread Michael Prager
There is a slightly easier way to make your own functions available. 1. Set up a directory for your R configuration. I use d:\r\mhp. Copy .Rprofile, Rconsole, Rdevga there. 2. Set up a Windows environment variable R_USER pointing to that directory. For example: R_USER=d:\r\mhp The point of

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Peter Dalgaard
Gray Calhoun [EMAIL PROTECTED] writes: Tolga, Look at numericDeriv. arbfun - function(x) x^2 x - 3 numericDeriv(quote(arbfun(x)), x) [1] 9 attr(,gradient) [,1] [1,]6 However, numericDeriv is not particularly intelligent. It is effectively doing what Tolga was trying not

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Tolga Uzuner
Actually, I did implement this using richardson extrapolation, but am having trouble vectorising it. For some reason, it fails within integrate... Anyone willing to look over the below and let me know what I am doing wrong, helps much appreciated. You can cut paste the below into the console..

[R] finding warning point in function

2006-03-12 Thread Federico Calboli
Hi everyone, I would like to find out when and where exactly I get the following warning in a piece of code I've written: Error in [-(`*tmp*`, iseq, value = numeric(0)) : nothing to replace with The code is a for () loop performing a somewhat trivial calculation, modulated by a number

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Gabor Grothendieck
Note that warning message. Its trying to evaluate qnorm outside of its allowable domain. On 3/12/06, Tolga Uzuner [EMAIL PROTECTED] wrote: Actually, I did implement this using richardson extrapolation, but am having trouble vectorising it. For some reason, it fails within integrate... Anyone

Re: [R] finding warning point in function

2006-03-12 Thread Gabor Grothendieck
If your function is called f then options(warn = 2) debug(f) will cause the warning to be converted to an error and when the error stops the code just issue: traceback() On 3/12/06, Federico Calboli [EMAIL PROTECTED] wrote: Hi everyone, I would like to find out when and where exactly I get

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Gray Calhoun
Ah, yes. I see your point. Apologies to all for the misinformation. --Gray On 12 Mar 2006 19:31:18 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: Gray Calhoun [EMAIL PROTECTED] writes: Tolga, Look at numericDeriv. arbfun - function(x) x^2 x - 3 numericDeriv(quote(arbfun(x)),

[R] Changing predictor order in lm()

2006-03-12 Thread Justin BEM
Hi, I don't know why you want but to say the code you can try body(lm) or simply type lm The order in anova is important in nested design ! you can use the libre car and try another type of SS type. -

[R] exit codes for Rcmd.exe under Windows

2006-03-12 Thread Richard Evans
Hello, I know i'm being lazy, but does anyone know what the exit codes mean for Rcmd.exe under windows? I'm getting 1's and 2's. thanks! -rich __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Ordination of feature film data question

2006-03-12 Thread David Woods
I am severely rusty re. multivariate / ordination analysis, having done my last work 40 years ago (in plant ecology). I am interested in exploring applications of multivariate analytic approaches to data from the history of motion picture films. I'd very much appreciate any pointers as to

[R] [R-pkgs] New package for calibration of biplot axes.

2006-03-12 Thread Jan Graffelman
Hi, I recently uploaded a package called calibrate to CRAN. This package contains routines for the calibration of (oblique) axes in biplots and scatter plots. Documentation provides examples for ordinary scatter plots with additional axes, biplots from principal component analysis, correspondence

[R] [R-pkgs] Spectrino 1.5 update

2006-03-12 Thread Teodor Krastev
Dear R users, a new release (v1.5) of Spectrino package is on CRAN. For those of you not familiar with Spectrino: Spectrino is a spectra preparation utility for R. It has specialized organization and visualization features for spectra. Spectrino has visual interface - as Windows application

Re: [R] R-help Digest, Vol 37, Issue 12

2006-03-12 Thread Ferran Carrascosa
Hi r-users, I would like to know if R have any solution to the Address standardization. The problem is to classify a database of addresses with the real addresses of a streets of Spain. Ideally, I would like to assign Postal code, census data and other geographic information. If this is not

Re: [R] exit codes for Rcmd.exe under Windows

2006-03-12 Thread Duncan Murdoch
On 3/10/2006 6:29 PM, Richard Evans wrote: Hello, I know i'm being lazy, but does anyone know what the exit codes mean for Rcmd.exe under windows? I'm getting 1's and 2's. See https://svn.r-project.org/R/trunk/src/gnuwin32/front-ends/rcmdfn.c. The exit code should be the return value

[R] Pakcage for fitting data into an arbitrary nonlinear function

2006-03-12 Thread Young-Jin Lee
Dear R lister Could any one tell me what R package I can use to fit data into an arbitrary nonlinear function and to test how good a resulting fit is? Thanks in advance. Young-Jin Lee __ R-help@stat.math.ethz.ch mailing list

Re: [R] Want to fit random intercept in logistic regression (testing lmer and glmmML)

2006-03-12 Thread Spencer Graves
The problem you report is related to the fact that a variance component can NOT be estimated from individual binary observations. The data do not contain enough information. I don't know the minimum requirements, but you could get estimates if you had some 0's and some 1's for

Re: [R] Pakcage for fitting data into an arbitrary nonlinear func tion

2006-03-12 Thread Liaw, Andy
Your question is too vague. Do you want to fit functions of one variable, or several variables? Do you need the function to have explicit form, or would you be happy with sort of `black box'? R itself has facilities to fit smooth functions of one variable (e.g., smooth.spline(), loess(), etc.)

Re: [R] R-help Digest, Vol 37, Issue 12

2006-03-12 Thread Liaw, Andy
From: Ferran Carrascosa Hi r-users, I would like to know if R have any solution to the Address standardization. The problem is to classify a database of addresses with the real addresses of a streets of Spain. Ideally, I would like to assign Postal code, census data and other

Re: [R] boosting for multi-class classification

2006-03-12 Thread Charles C. Berry
Simon Knapp sleepingwell at gmail.com writes: Hi List, I can't seem to find a package that implements boosting for multi-class classification. Does such a package exist? In an R session, try RSiteSearch( boosting, restrict=functions ) This gives 15 hits. Would the package 'caTools'

Re: [R] Pakcage for fitting data into an arbitrary nonlinear function

2006-03-12 Thread Gabor Grothendieck
Not sure I understand what you want but look at ?nls and see if that answers it. On 3/12/06, Young-Jin Lee [EMAIL PROTECTED] wrote: Dear R lister Could any one tell me what R package I can use to fit data into an arbitrary nonlinear function and to test how good a resulting fit is? Thanks

Re: [R] difference between 2 dates: IN MONTHS the way Motherscompute it

2006-03-12 Thread Francisco J. Zagmutt
Thanks Gabor, that's what I understood but then why do I get these results? library(zoo) 12*as.numeric(as.yearmon(2006-03-07)-as.yearmon(2006-02-07)) [1] NA Warning messages: 1: NAs introduced by coercion 2: NAs introduced by coercion 12*as.numeric(as.yearmon(2006-03-07)-as.yearmon(2006-02-07))

Re: [R] difference between 2 dates: IN MONTHS the way Motherscompute it

2006-03-12 Thread Gabor Grothendieck
Maybe you have an old version of zoo? When I run the first one I get 1. I am using R 2.2.1 under Windows XP and checking the Built: line of library(help = zoo) I am using the verson of zoo version built on Feb 6, 2006: 12*as.numeric(as.yearmon(2006-03-07)-as.yearmon(2006-02-07)) [1] 1 In the

[R] bihistogram plots

2006-03-12 Thread Hal Varian
Does anyone have code to plot bihistograms in R? See http://www.itl.nist.gov/div898/handbook/eda/section3/bihistog.htm for a description of a bihistogram. -- Hal Varian voice: 510-643-4757 SIMS, 102 South Hall fax: 510-642-5814 University of California [EMAIL

Re: [R] bihistogram plots

2006-03-12 Thread Liaw, Andy
I believe the histbackback() function in the `Hmisc' package does what you want. Andy From: Hal Varian Does anyone have code to plot bihistograms in R? See http://www.itl.nist.gov/div898/handbook/eda/section3/bihistog.htm for a description of a bihistogram. -- Hal Varian

[R] nls number of explantory variables

2006-03-12 Thread Cal Stats
Hi.. is there a limit on the number of explanatory variables in nls ? i have a dataframe with the columns names x1,x2..,x300 when i run nls it gives the error: x181 not found thought it does run when i have x1,x2,...,x170 variables. Thanks Harsh

Re: [R] Mixed GLM methodology and execution question

2006-03-12 Thread Spencer Graves
Have you considered 'lmer' (split between the lme4 and Matrix packages)? To learn about this, I suggest you also consult the vignettes in the 'mlmRev' package. hope this helps, spencer graves p.s. If you are unfamiliar with vignettes, I suggest you consult

Re: [R] Use of step() with an unbalanced ANOVA model

2006-03-12 Thread Liaw, Andy
This is not really answering your question... If the data really came from a designed experiment, I believe `model simplification' is likely inappropriate. Andy From: Christoph Scherber Dear all, Is it dangerous to use step() during model simplification when I have an ANOVA design

Re: [R] difference between 2 dates: IN MONTHS the way Motherscompute it

2006-03-12 Thread Francisco J. Zagmutt
Right! I updated zoo and the example worked. I should have started by updating the library in the first place...I slept well and I had my cup of coffee this morning so I don't really have any excuse :-) Thanks Gabor! Francisco From: Gabor Grothendieck [EMAIL PROTECTED] To: Francisco J.

Re: [R] bihistogram plots

2006-03-12 Thread Gabor Grothendieck
Also note that there is an example of that here: http://addictedtor.free.fr/graphiques/graphcode.php?graph=136 On 3/12/06, Liaw, Andy [EMAIL PROTECTED] wrote: I believe the histbackback() function in the `Hmisc' package does what you want. Andy From: Hal Varian Does anyone have code to

Re: [R] Sharing of Libraries (S+ and R)

2006-03-12 Thread Liaw, Andy
You might want to check out: http://www.omegahat.org/RinS/ Andy From: [EMAIL PROTECTED] Hi, Can anyone please advise if there is a neat way to 'share' libraries of (previously developed) S+ code with R? Specifically, within S+ I can use the attach(what = Chapter Directory, pos =

Re: [R] bihistogram plots

2006-03-12 Thread Hal Varian
Just what I want, thanks! Gabor Grothendieck wrote: Also note that there is an example of that here: http://addictedtor.free.fr/graphiques/graphcode.php?graph=136 On 3/12/06, Liaw, Andy [EMAIL PROTECTED] wrote: I believe the histbackback() function in the `Hmisc' package does what you

Re: [R] bihistogram plots

2006-03-12 Thread Dirk Eddelbuettel
On 12 March 2006 at 20:12, Hal Varian wrote: | Just what I want, thanks! It would be nice to have a function akin to the NIST example you referred, i.e. rotated with the histograms 'on top of each other' rather than back to back. However, from a quick glance at Pat Burns' code in histbackback()

[R] Density Estimation

2006-03-12 Thread Jacob van Wyk
Hallo I am trying to use the package LocFit to follow the example given in an Introductory note of C Loader concerning density estimation. It involves the geyser dataset (107 observations on durations, inlc in the package). I have tried the following (using the latest version of R): fit.of -

Re: [R] RFC: default background on lattice plots

2006-03-12 Thread Martin Maechler
JohnF == John Fox [EMAIL PROTECTED] on Sat, 11 Mar 2006 13:29:34 -0500 writes: JohnF Dear Deepayan, As you say, it's currently very easy JohnF to change settings (which is what I do routinely), JohnF but since you asked, I much prefer the settings in JohnF

Re: [R] Ordination of feature film data question

2006-03-12 Thread Prof Brian Ripley
`Ordination' is ecologists' terminology for multidimensional scaling. You will find worked examples in MASS (the book, see the R FAQ), and the two most commonly used functions, isoMDS and sammon, in MASS the package. In your example, the main issue is going to be to choose an appropriate