Re: [R] AIC extract and comparison

2008-04-30 Thread Uwe Ligges
Lisa wrote: Hi, I need to fit models and use AIC method to campare the best fitted model manually. When i extract AIC by using extractAIC, it gave me the df and AIC values. Now the problem is, how can I compare the AIC values from two models? is there anyway to extract AIC with no df so that

[R] What are ties? Wilcox u-test

2008-04-30 Thread Dirkheld
Hi, When I execute a Wilcox u-test on two variables I receive a warning : 'cannot compute exact p-value with ties' - What are ties? What does this mean for my data? - Is that a problem for significance testing? - is there a way to overcome this problem? I have different threads in this forum

Re: [R] What are ties? Wilcox u-test

2008-04-30 Thread Uwe Ligges
Dirkheld wrote: Hi, When I execute a Wilcox u-test on two variables I receive a warning : 'cannot compute exact p-value with ties' - What are ties? What does this mean for my data? If you have two identical values in your data, these are called ties. Now the ranks are not unique anymore and

Re: [R] Problem installing packages

2008-04-30 Thread Uwe Ligges
I cannot reproduce this, hence we need much more information in order to reproduce the problem. Which OS are we talking about? XP or Vista? If Vista: Are you running R with administrator privileges when trying to install the packages? Please do so (e.g. by right-clicking appropriately when

Re: [R] What are ties? Wilcox u-test

2008-04-30 Thread Ted Harding
On 30-Apr-08 07:47:56, Uwe Ligges wrote: Dirkheld wrote: Hi, When I execute a Wilcox u-test on two variables I receive a warning : 'cannot compute exact p-value with ties' - What are ties? What does this mean for my data? If you have two identical values in your data, these are called

Re: [R] Combine Values into a Vector or List

2008-04-30 Thread Diego Culattoni
Hello Jorge, Sorry, my aim is to get each individual separately, so that if I input A1 # the the result would be     1 This because I would like to use lm.D - lm(y~A1+A1+A3...) Thanks, Diego - Original Message From: Jorge Ivan Velez [EMAIL PROTECTED] To: Diego Culattoni [EMAIL

[R] randomForest weighting of variables and count data

2008-04-30 Thread Birgit Lemcke
Hello R-user! I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner) I try to find the most important variables to divide my dataset as given in a categorical variable using randomForest. I was wondering if there is the possibility in randomForest to give

[R] Summary statistics across factor levels

2008-04-30 Thread Lauri Nikkinen
R users, I intention is to calculate some summary statistics across factor levels. I know that in Hmisc package there is a summary function which produces neat summary statistics when using cross option. I would like to produce similar output with N and Missing columns but produce a data.frame.

[R] missing values in document

2008-04-30 Thread Monna Nygård
No matter how I´ve tried o find a solution for this simple question, I can´t. Sorry for bothering with such a matter. I have an excel-files with some empty cells=missing values. How do I tell R that these should be NA´s? TRFLP1 -(read.table(file=S://SEDIM//Kokeilu//TRFLP1.txt,col.names=

Re: [R] + and - in RODBC : no longer considered factors

2008-04-30 Thread Prof Brian Ripley
It is nothing to do with RODBC, which follows read.table here: % cat foo.txt x + - ... read.table(foo.txt, header=TRUE) x 1 0 2 0 and that uses type.convert(c(+, -)) [1] 0 0 type.convert(c(+, a)) [1] + a Levels: + a Whereas 2.6.2 did type.convert(c(+, -)) [1] + - Levels: + - The

Re: [R] ggplot2: labels and breaks order does not match and I can't usescale_fill_identity

2008-04-30 Thread ONKELINX, Thierry
Mikhail, Have you tried sorting your dataframe according to the levels on the x-axis? HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel

Re: [R] Empty Set In a Set

2008-04-30 Thread Duncan Murdoch
On 29/04/2008 9:39 PM, Jason Q. McClintic wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dear List: I'm looking for a form of the empty set such that if ES is said representation, ~ES %in% c(1,2,3) evaluates to TRUE. %in% is a vector operator, checking each element of ES and

Re: [R] ggplot2: labels and breaks order does not match and I can't use scale_fill_identity

2008-04-30 Thread Xavier Chardon
The solution to this problem is in the mail below. I initially forgot to send a copy to the mailing list, and I'm doing it now for the record, in case someone bumps into this problem. Xavier Message original Sujet: Re: [R] ggplot2: labels and breaks order does not match and

Re: [R] missing values in document

2008-04-30 Thread S Ellison
What exactly is on line 1743? Genuinely empty cells will probably read as NA anyway. Excel errors, prefixed # in excel, will be read as comment markers and cause the remainder of the line to be ignored. This often causes this kind of error. Steve E Monna Nygård [EMAIL PROTECTED] 30/04/2008

Re: [R] missing values in document

2008-04-30 Thread Jim Lemon
Monna Nygård wrote: No matter how I´ve tried o find a solution for this simple question, I can´t. Sorry for bothering with such a matter. I have an excel-files with some empty cells=missing values. How do I tell R that these should be NA´s? TRFLP1

Re: [R] + and - in RODBC : no longer considered factors

2008-04-30 Thread Dieter Menne
Prof Brian Ripley ripley at stats.ox.ac.uk writes: It is nothing to do with RODBC, which follows read.table here: % cat foo.txt x + - ... read.table(foo.txt, header=TRUE) x 1 0 2 0 and that uses type.convert(c(+, -)) [1] 0 0 type.convert(c(+, a)) [1] + a Levels: +

[R] rmvbin

2008-04-30 Thread Timmy Mutsvari
Hie all, Anyone with an idea on how to generate binary data using (rmvbin) taking into account covariates e.g age and gender. Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] fCopulae

2008-04-30 Thread chockri adnen
Hello, Hela wrote : My problem in a few words is as folow: I used the fCopulae packages because i have 2 series which are already transformed in the uniform domain (the space of the copulas functions) and i estimated with type archmList() from 1 to 22, but i don't know their names:for exemple

Re: [R] Summary statistics across factor levels

2008-04-30 Thread Henrique Dallazuanna
Try this: sek - seq(1, nrow(Indometh), 9) Indometh$time[sek] - NA Indometh$timeclass - factor(cut(Indometh$time, breaks=c(0,2,4,6,8,10))) x - summary(conc ~ Subject + timeclass, method=cross, data=Indometh) vec - x$S dim(vec) - attr(x, out.attrs)$dim dimnames(vec) - attr(x, out.attrs)$dimnames

Re: [R] missing values in document

2008-04-30 Thread jim holtman
How are the 'empty' cell identified? It appears that you are using the default of read.table which says blanks are the delimiters. How are two or more empty cells identified? Can you output a CSV file so that you have commas as separators so you can identify the empty fields? On Wed, Apr 30,

[R] fft: characteristic function to distribution

2008-04-30 Thread Thomas Steiner
The characteristic function is the inverse Fourier transform of the distribution function. The characteristic function of a normaly distributed random variable is exp(-t^2/2). x=seq(-2,2,length=100) fft(pnorm(x),inverse=T)/length(x) exp(-x^2/2) Why aren't the inverse fft and the mentioned

Re: [R] Summary statistics across factor levels

2008-04-30 Thread Frank E Harrell Jr
Lauri Nikkinen wrote: R users, I intention is to calculate some summary statistics across factor levels. I know that in Hmisc package there is a summary function which produces neat summary statistics when using cross option. I would like to produce similar output with N and Missing columns but

[R] Survival Regression with multiple records per subject

2008-04-30 Thread Fabian Hefner
Dear R users! I reformulate the question with another example perhaps my question will be more clearly now. I have several subjects. One subject has multiple records. Only a starting point exists the end point is vague. Here is an example: itm ID exercise time 1.4018691

[R] dlda scores

2008-04-30 Thread John Lande
Dear Bioc, I am using the stat.diag.da function from sma package in R-2.7.0 to make class prediction in microarray dataset. I would like to retrive the not only the classification, but also the raw score assigned to each sample in order to be classified both in the training and in the validation

Re: [R] Survival Regression with multiple records per subject

2008-04-30 Thread Dimitris Rizopoulos
If 'itm' is a covariate with measurement error, then you could also have a look at the 'JM' package. I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

Re: [R] How do you test for consecutivity?

2008-04-30 Thread Karl Ove Hufthammer
Charles C. Berry: Are the numbers 1:30 equiprobable?? If so, you can find the probability by direct enumeration. Or by a simple formula: * Probabilities of Consecutive Integers in Lotto * Author(s): Stanley P. Gudder and James N. Hagler * Source: Mathematics Magazine, Vol. 74,

Re: [R] c code working in linux and hanging in windows

2008-04-30 Thread Ben Bolker
Vidhu Choudhary vidhu.choudhary at gmail.com writes: Hi All, I am calling some c code from R. It successfully makes the dll and .so files. When I run .so in Linux is works prefect but hangs in windows. Though the dll loads but it never returns back from the c function Can you please

Re: [R] Applying user function over a large matrix

2008-04-30 Thread Sudipta Sarkar
Dear Folks Thanks for all your replies and suggestions, I will be trying out these suggestions today and let you know how it goes. Please let me know if you can think of anything else to resolve the issue. Regards Original message Date: Tue, 29 Apr 2008 15:43:41 -0700 From: Bert Gunter

Re: [R] Cross Spectrum Analysis

2008-04-30 Thread stephen sefick
$names [1] freq spec coh phase kerneldf [7] bandwidth n.usedorig.nseriessnamesmethod [13] taper pad detrend demean $freq and $spec are used to plot the power spectrum. freq is the x-axis and spec is the y-axis. $coh is the squared coherency

[R] Tab-delimited AOV summaries

2008-04-30 Thread Chris Sims
Hello, I am trying to print out ANOVA summaries --- as returned by summary (aov(...))--- in tab-delimited format, either to a file or to the console, but so far I haven't been able to figure out a solution. My particular ANOVA has repeated measures, so it is an instance of class aovlist.

Re: [R] NumDeriv - derivatives of covariance matrix

2008-04-30 Thread Paul Gilbert
Your calculation can be thought of as a function from R^m to R^(n*n), and functions in numDeriv can be used to calculate a numerical approximation to the derivative of the function. However, the functions in numDeriv try to calculate accurate approximations, as opposed to quick approximations

Re: [R] Calling R from C - part way there but need a push!

2008-04-30 Thread Jeffrey Horner
Maximillian Murphy wrote on 04/29/2008 11:19 AM: Dear All, I've read the manual on Writing R Extensions and in particular the part on calling R from C. (Most of the manual is about calling C from R, not the other way around.) The good news is that I can now call _some_ R from C,

Re: [R] + and - in RODBC : no longer considered factors

2008-04-30 Thread Prof Brian Ripley
So the only workaround to make the large old code base to work is get the old type.convert implementation and inject it. That would be rather hard. Try R-patched (from tomorrow, say) instead. Note that in well over a month of testing no one else has reported this. On Wed, 30 Apr 2008, Dieter

Re: [R] Empty Set In a Set

2008-04-30 Thread Jason Q. McClintic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Exactly what I needed. Thanks to everyone who replied. Sincerely, Jason Q. McClintic - -- MIDN 1/C Jason Q McClintic Battalion Commander Naval ROTC Battalion University of Minnesota UST MB 1945 2115 Summit Avenue Saint Paul, MN 55105 [EMAIL

[R] wireframe - add data points

2008-04-30 Thread Strubbe Diederik
Hello all, I’m trying to add some data points to a wireframe. X an Y axis are independent variables, Z axis is predicted probability. I’d like to add the original data points on which the predicted probabilities are based to the wireframe. I’ve followed some of the previous post on this but

Re: [R] fft: characteristic function to distribution

2008-04-30 Thread Prof Brian Ripley
On Wed, 30 Apr 2008, Thomas Steiner wrote: The characteristic function is the inverse Fourier transform of the distribution function. The characteristic function of a normaly distributed random variable is exp(-t^2/2). The fft is a discrete Fourier transforn, not a continuous one. Further in

[R] Test its performace on new data of a established neural network or SVM model

2008-04-30 Thread jrwang
Hi: I have already using the MLInterface to train and build a neural network model and SVM model to clustering a set of data. Now I have a new set of data. I need use these established NN model and SVM to cluster these new data without retraining it. I am aware that I can use predict command

Re: [R] Problem installing packages

2008-04-30 Thread Owe Jessen
Owe Jessen schrieb: Hi, when I try installing new packages (in this case DBI) I run into the following problem: Paket 'DBI' erfolgreich ausgepackt und MD5 Summen abgeglichen Warnung: kann temporäre Installation 'C:\Programme\R\R-2.7.0\library\file5f906952\DBI' nicht nach 'ÝxlDÌú [EMAIL

[R] error with lme within a loop

2008-04-30 Thread Tomas Goicoa
Dear R users, I want to conduct a small simulation study and I have to use the lme function in a loop to save the restricted log likelihood. However, for one simulated data set the lme function gives this error Error en lme.formula(yboot ~ X[, -1], data = data.fr, random = Z.block) :

[R] checking whether a file is empty

2008-04-30 Thread Faheem Mitha
Hi, Is there a way to check whether a file is empty in R. I did the customary searches, but did not find anything. Please cc me on any reply. Thanks, Faheem. __ R-help@r-project.org mailing

Re: [R] checking whether a file is empty

2008-04-30 Thread Prof Brian Ripley
What is wrong with file.create(foo) [1] TRUE file.info(foo)$size [1] 0 file.remove(foo) ? I really wonder what searches you did: help.search(file) come up with file.info. On Wed, 30 Apr 2008, Faheem Mitha wrote: Is there a way to check whether a file is empty in R. I did the

Re: [R] checking whether a file is empty

2008-04-30 Thread Faheem Mitha
On Wed, 30 Apr 2008, Prof Brian Ripley wrote: What is wrong with file.create(foo) [1] TRUE file.info(foo)$size [1] 0 file.remove(foo) ? Thanks, that works for me. I really wonder what searches you did: help.search(file) come up with file.info. I did a Google search for R check

Re: [R] wireframe - add data points

2008-04-30 Thread Deepayan Sarkar
On 4/30/08, Strubbe Diederik [EMAIL PROTECTED] wrote: Hello all, I'm trying to add some data points to a wireframe. X an Y axis are independent variables, Z axis is predicted probability. I'd like to add the original data points on which the predicted probabilities are based to the

Re: [R] checking whether a file is empty

2008-04-30 Thread Jorge Ivan Velez
Hi Faheem, Also, you could try in www.rseek.org and RSiteSearch(your.topic.here). HTH, Jorge On Wed, Apr 30, 2008 at 11:53 AM, Faheem Mitha [EMAIL PROTECTED] wrote: On Wed, 30 Apr 2008, Prof Brian Ripley wrote: What is wrong with file.create(foo) [1] TRUE

Re: [R] Problem installing packages

2008-04-30 Thread Prof Brian Ripley
The first message makes sense, but unfortunately if we cannot reproduce it, we cannot help. The issue appears to be that your OS is garbling file names. Is this is a translation back from German? The original would appear to be unable to move temporary installation '...' to '...'

Re: [R] checking whether a file is empty

2008-04-30 Thread Henrik Bengtsson
help(file.info). /Henrik On Wed, Apr 30, 2008 at 5:33 PM, Faheem Mitha [EMAIL PROTECTED] wrote: Hi, Is there a way to check whether a file is empty in R. I did the customary searches, but did not find anything. Please cc me on any reply.

Re: [R] checking whether a file is empty

2008-04-30 Thread Dirk Eddelbuettel
On Wed, Apr 30, 2008 at 11:33:01AM -0400, Faheem Mitha wrote: Is there a way to check whether a file is empty in R. I did the customary searches, but did not find anything. Please cc me on any reply. Empty file have, by definition, a size of zero, so here's one way: system(touch /tmp/faheem)

[R] randomForest interaction detection

2008-04-30 Thread Retzer Joe
I've been using the randomForest package and getting very useful results for some time now. I have a question pertaining to variable interactions. Since, unlike CART, no single tree representative of the solution is available, I was wondering if there was some way of discerning /

Re: [R] predict.glm newdata

2008-04-30 Thread Yasir Kaheil
You could just say: yhat=predict(reg1,x2) the function predict will assing x2 to 'newdata' by default. thanks Daniel Malter wrote: Hi, could it be the newdata argument? When I run predict with the newdata argument, I get an error message - a different one though. The second reason

[R] sudden problem with script

2008-04-30 Thread daniel guertin
Hi, First off, please understand that I am not a frequent R user. I am trying to use a script generated by another program in R for a certain analysis. I have used the script successfully in the past. Recently, when trying to load the script, I receive a warning message: package 'nls' has

Re: [R] sudden problem with script

2008-04-30 Thread Daniel Nordlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of daniel guertin Sent: Wednesday, April 30, 2008 9:59 AM To: r-help@r-project.org Subject: [R] sudden problem with script Hi, First off, please understand that I am not a frequent R user. I am

[R] Bug? in summary( ) function base package

2008-04-30 Thread Richard Saba
There seems to be an error in the summary() function when applied to ts class objects. The results of a call to summary( ), on the R ts data set USAccDeaths , reports the wrong value for Max. The value reported by the summary function is 11320. The max( ) function returns the correct value 11317,

Re: [R] Bug? in summary( ) function base package

2008-04-30 Thread hadley wickham
On Wed, Apr 30, 2008 at 1:06 PM, Richard Saba [EMAIL PROTECTED] wrote: There seems to be an error in the summary() function when applied to ts class objects. The results of a call to summary( ), on the R ts data set USAccDeaths , reports the wrong value for Max. The value reported by the

[R] ordering a factor in boxplot output

2008-04-30 Thread Tubin
I'm sure I'm missing something obvious in the documentation... I'm generating a boxplot boxplot(CleanValue~ApptCategory*ReportingCode,data=newfile) where ApptCategory is a factor with possible values (New,Established) Problem is, the output orders those factors alphabetically, and I'd really

Re: [R] Use of recordPlot

2008-04-30 Thread Greg Snow
My impression of the plot recording in windows was that it was a quick tool to be useful, but not a high priority. Trying to keep track of 50 plots (and using different plot windows) is pushing it beyond its original intention. I expect that he core people have higher priorities, so may not

[R] Aggregate() questions

2008-04-30 Thread Chip Barnaby
Dear all -- I have a data frame containing data related to heat gain through windows. The general form is ... Key ProfAIAC many other numeric columns AAA0.7 AAA 10.6 AAA0 .66 AAA 20 .45 (more AAA rows) (then AAB rows) 'Key' identifies the

Re: [R] Survival Regression with multiple records per subject

2008-04-30 Thread Ronaldo Reis Junior
Em Qua 30 Abr 2008, Fabian Hefner escreveu: Here is an example:      itm      ID     exercise      time 1.401869    1        0             1 1.324390    1        0             2 1.324390    1        0             3 1.38    1        0             4 1.346761    1        0             5

Re: [R] Aggregate() questions

2008-04-30 Thread Henrique Dallazuanna
If I understand your question: x$IAC0 - with(x, ave(IAC, list(ProfA, Key), FUN = mean)) On Wed, Apr 30, 2008 at 3:52 PM, Chip Barnaby [EMAIL PROTECTED] wrote: Dear all -- I have a data frame containing data related to heat gain through windows. The general form is ... Key ProfAIAC

[R] R isn't finding tcltk

2008-04-30 Thread John P. Burkett
On a x86 machine operating under Gentoo Linux, I'm having persistent difficulty in getting R version 2.6.1 (the latest available through Gentoo's portage system) to use tcltk. The R command library(tcltk) elicits the following response: Error in firstlib(which.lib.loc, package) : Tcl/Tk

[R] How to stop buffering of cat

2008-04-30 Thread Vidhu Choudhary
Hi All, My R code takes very long time to finish the processing. I want to see at what stage the script is running. So I wrote some output messages using cat. But instead of displaying the cat messages at different stages they are buffered and displayed in the end when entire processing is done.

Re: [R] How to stop buffering of cat

2008-04-30 Thread Tony Plate
If you're using Rgui under Windows, see FAQ 7.1: 7.1 When using Rgui the output to the console seems to be delayed. This is deliberate: the console output is buffered ... (the FAQ says how to turn it off -- it's a menu item). Vidhu Choudhary wrote: Hi All, My R code takes very long time to

Re: [R] How to stop buffering of cat

2008-04-30 Thread Charles C. Berry
On Wed, 30 Apr 2008, Vidhu Choudhary wrote: Hi All, My R code takes very long time to finish the processing. I want to see at what stage the script is running. So I wrote some output messages using cat. But instead of displaying the cat messages at different stages they are buffered and

[R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Zhandong Liu
I am switching from Matlab to R, but I found that R is 200 times slower than matlab. Since I am newbie to R, I must be missing some important programming tips. Please help me out on this. Here is the function: ## make the full pair-wise permutation of a vector ## input_fc=c(1,2,3); ##

Re: [R] R isn't finding tcltk

2008-04-30 Thread Peter Dalgaard
John P. Burkett wrote: On a x86 machine operating under Gentoo Linux, I'm having persistent difficulty in getting R version 2.6.1 (the latest available through Gentoo's portage system) to use tcltk. The R command library(tcltk) elicits the following response: Error in firstlib(which.lib.loc,

[R] How to fit parametric survival model using counting process data

2008-04-30 Thread Rachel Jia
Hi, I was trying to fit a parametric survival model with Weibull distribution on counting process type of data (NOT interval censor data), but the survreg(Surv(T1,T2,event)~x,data,dist=weibull) did not seem to work. Anyone can help me with that? Thanks, Rachel Memorial Sloan-Kettering Cancer

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Wensui Liu
Hi, ZD, Your comment about speed is too general. Here is a benchmark comparison among several languages and HTH. http://www.sciviews.org/benchmark/index.html On Wed, Apr 30, 2008 at 4:15 PM, Zhandong Liu [EMAIL PROTECTED] wrote: I am switching from Matlab to R, but I found that R is 200 times

[R] Getting variable names from as.matrix

2008-04-30 Thread David Kaplan
Hi all, I'm running a multidimensional scaling model on data that are first transformed into a similarity matrix using the program daisy in the cluster package. If I already provide the similarity matrix, the plotting routine will give me the variable names on the plot itself. But, it

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Gabor Csardi
I would rather not comment on matlab (where is your matlab code by the way?), but your function could be simplified a bit: grw.permute - function(v) { cbind( rep(v, each=length(v)), rep(v, length(v)) ) } system.time(tmp - f( 1:300)) user system elapsed 0.020 0.000 0.019 This is

[R] arcsine transformation

2008-04-30 Thread Claire Sheller
I have been trying to preform both a bartlett's test and an arcsine transformation on some average percentage data. I've tried inputting it different ways and I keep getting the same error message: head(workingdata) DYAD BEFORE AFTER 1 BG-FL 4.606772 5.787520 2 BG-LL 5.467503 7.847395

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread jim holtman
You just have to use the right functions: is this fast enough system.time(x - expand.grid(1:300, 1:300)) user system elapsed 0.000.010.01 On Wed, Apr 30, 2008 at 4:15 PM, Zhandong Liu [EMAIL PROTECTED] wrote: I am switching from Matlab to R, but I found that R is 200 times

Re: [R] Bug? in summary( ) function base package

2008-04-30 Thread Mike Prager
Richard Saba [EMAIL PROTECTED] wrote: There seems to be an error in the summary() function when applied to ts class objects. The results of a call to summary( ), on the R ts data set USAccDeaths , reports the wrong value for Max. The value reported by the summary function is 11320. The max(

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Erik Iverson
Zhandong Liu wrote: I am switching from Matlab to R, but I found that R is 200 times slower than matlab. Since I am newbie to R, I must be missing some important programming tips. The most important tip I would give you is to use the vectorized nature of R whenever possible. This helps

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Gabor Csardi
But please consider that this benchmark is five years old, and i believe that R has changed quite a lot since version 1.9. Gabor On Wed, Apr 30, 2008 at 04:21:51PM -0400, Wensui Liu wrote: Hi, ZD, Your comment about speed is too general. Here is a benchmark comparison among several

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Peter Dalgaard
Zhandong Liu wrote: I am switching from Matlab to R, but I found that R is 200 times slower than matlab. Since I am newbie to R, I must be missing some important programming tips. Please help me out on this. Here is the function: ## make the full pair-wise permutation of a vector ##

Re: [R] ordering a factor in boxplot output

2008-04-30 Thread Peter Alspach
One option is to set the order in newfile: newfile$ApptCategory - factor(newfile$ApptCategory, levels=c('New','Established')) Of course, this will then affect the order for other things associated with ApptCategory, but that is probably what you want. HTH ... Peter Alspach -Original

[R] Fwd: Why R is 200 times slower than Matlab ?

2008-04-30 Thread roger koenker
This is what I refer to as ab uno disce omnes-thinking: -- from one example all is revealed -- but this is the antithesis of statistical thinking. Here is an example function, others can probably do better. On a vector of length 300 it takes .018 seconds on my aging G5 ppc mac: pears -

Re: [R] arcsine transformation

2008-04-30 Thread Michael Kubovy
Perhaps you need with(workingdata, asin(BEFORE)) or asin(workingdata$BEFORE) _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400Charlottesville, VA 22904-4400 Parcels:Room 102Gilmer Hall McCormick

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Ray Brownrigg
On Thu, 01 May 2008, Zhandong Liu wrote: I am switching from Matlab to R, but I found that R is 200 times slower than matlab. Since I am newbie to R, I must be missing some important programming tips. Please help me out on this. Here is the function: ## make the full pair-wise permutation

[R] Lattice book

2008-04-30 Thread Mark Wardle
Dear all, I haven't seen this mentioned and presumably Dr. Deepayan Sarkar is too polite to advertise! I just received a flyer from Springer: A new book on Lattice released today!!

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Zhandong Liu
This is the missing Matlab code: function[fc_matrix]=grw_permute(fc_vector) n=length(fc_vector); fc_matrix=zeros(2,n^2); index=1; for i=1:n for j=1:n fc_matrix(index)=fc_vector(i); fc_matrix(index+1)=fc_vector(j); index=index+2; end end On Wed, Apr 30,

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Ray Brownrigg
Ah, so the code is quite similar in MATLAB (and the *algorithm* is the same :-) ). The Important programming tip is that when converting from MATLAB to R, you shouldn't just 'translate' from MATLAB code to R code, you must reconsider the problem in the context of the R environment. This is

[R] why my code is not computing significance level and power correctly

2008-04-30 Thread jinjin
I am trying to compare Levene,bartlett, count5 tests for a random normal sample for the significance level and power, the problem seems bug free but with obvious wrong result, anyone can help, I send the R code as attachment. Thanks http://www.nabble.com/file/p16992744/758%2Bproject 758+project

[R] efficiency profiling? (was: Why R is 200 times slower than Matlab ?)

2008-04-30 Thread esmail bonakdarian
This has been an interesting discussion, and brings up two questions for me: Is there a good collection of hints/suggestions for R language idoms in terms of efficiency? For instance I read not to use for-loops, so I used apply only to later read that apply is internally implemented as a for so

Re: [R] Lattice book

2008-04-30 Thread Charilaos Skiadas
Actually it's been out for a couple of weeks now at least. I just finished my first reading of it, and I must say it was spectacular. Congratulations Deepayan, the book gave me exactly the kind of lattice knowledge I needed, and then some. The graphics are really impressive and good

Re: [R] arcsine transformation

2008-04-30 Thread Chuck Cleland
On 4/30/2008 4:52 PM, Claire Sheller wrote: I have been trying to preform both a bartlett's test and an arcsine transformation on some average percentage data. I've tried inputting it different ways and I keep getting the same error message: head(workingdata) DYAD BEFORE AFTER 1

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Gabor Grothendieck
Aside from optiming your code by making use of R functions that use C underneath as much as possible the big difference between R and Matlab is Matlab's just-in-time compilation of code. When that was introduced in Matlab huge speedups of Matlab programs were noticeable. For R, there is a new

Re: [R] Why R is 200 times slower than Matlab ?

2008-04-30 Thread Nelson Castillo
On Wed, Apr 30, 2008 at 6:27 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Aside from optiming your code by making use of R functions that use C underneath as much as possible the big difference between R and Matlab is Matlab's just-in-time compilation of code. When that was introduced

Re: [R] efficiency profiling? (was: Why R is 200 times slower than Matlab ?)

2008-04-30 Thread Gabor Csardi
On Wed, Apr 30, 2008 at 06:59:38PM -0400, esmail bonakdarian wrote: This has been an interesting discussion, and brings up two questions for me: Is there a good collection of hints/suggestions for R language idoms in terms of efficiency? For instance I read not to use for-loops, so I used

Re: [R] efficiency profiling?

2008-04-30 Thread Duncan Murdoch
On 30/04/2008 6:59 PM, esmail bonakdarian wrote: This has been an interesting discussion, and brings up two questions for me: Is there a good collection of hints/suggestions for R language idoms in terms of efficiency? For instance I read not to use for-loops, so I used apply only to later read

Re: [R] efficiency profiling?

2008-04-30 Thread esmail bonakdarian
See ?Rprof for the tool. For the tips, I think you just need to hang around here a while. I don't know of a nice collection (but I'm sure there are several.) Duncan Murdoch Hi, thanks .. several folks pointed me to Rprof, I'll take a look. Yes, I have been reading the list, the

Re: [R] efficiency profiling?

2008-04-30 Thread Duncan Murdoch
On 30/04/2008 7:47 PM, esmail bonakdarian wrote: See ?Rprof for the tool. For the tips, I think you just need to hang around here a while. I don't know of a nice collection (but I'm sure there are several.) Duncan Murdoch Hi, thanks .. several folks pointed me to Rprof, I'll take a

[R] using the sink() function in a for-look

2008-04-30 Thread Tony Dell
hi all, i wanted to use the sink function to sequentially output regression summaries within a for-loop. i must have something wrong somewhere (or be using the sink function incorrectly), but can anyone help? the code I am using is: where data.x is a data.frame of independents, and data.y is a

Re: [R] efficiency profiling?

2008-04-30 Thread Kingsford Jones
On Wed, Apr 30, 2008 at 4:33 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 30/04/2008 6:59 PM, esmail bonakdarian wrote: snip Is there a good collection of hints/suggestions for R language idoms in terms of efficiency? snip See ?Rprof for the tool. For the tips, I think you just need to

[R] Fwd: efficient code - yet another question

2008-04-30 Thread steven wilson
The code I sent before had some typos, here is the corrected one: pca.nipals - function(X, ncomp, iter = 50, toler = sqrt(.Machine$double.eps)) # X...data matrix, ncomp...number of components, # iter...maximal number of iterations per component, # toler...precision tolerance for calculation of

Re: [R] using the sink() function in a for-look

2008-04-30 Thread Rolf Turner
On 1/05/2008, at 2:32 PM, Tony Dell wrote: hi all, i wanted to use the sink function to sequentially output regression summaries within a for-loop. i must have something wrong somewhere (or be using the sink function incorrectly), but can anyone help? snip You need to

[R] (no subject)

2008-04-30 Thread Tony Dell
hi all, i wanted to use the sink function to sequentially output regression summaries within a for-loop. i must have something wrong somewhere (or be using the sink function incorrectly), but can anyone help? the code I am using is: where data.x is a data.frame of independents, and data.y is a

[R] Forecasting observations in ARFIMA

2008-04-30 Thread Jill Elizabeth
I would like to compute the next 15 observations for an ARFIMA(2,1,0) model along with confidence intervals. Can someone provide code? Many thanks. Jill [[elided Yahoo spam]]

[R] efficient code - yet another question

2008-04-30 Thread steven wilson
Dear list members; The code given below corresponds to the PCA-NIPALS (principal component analysis) algorithm adapted from the nipals function in the package chemometrics. The reason for using NIPALS instead of SVD is the ability of this algorithm to handle missing values, but that's a different

Re: [R] using the sink() function in a for-look

2008-04-30 Thread Johannes Hüsing
Tony Dell [EMAIL PROTECTED] [Thu, May 01, 2008 at 04:32:23AM CEST]: hi all, i wanted to use the sink function to sequentially output regression summaries within a for-loop. i must have something wrong somewhere (or be using the sink function incorrectly), but can anyone help? the code I

Re: [R] using the sink() function in a for-look

2008-04-30 Thread Tony Dell
bingo. thanks Ralph. __ tony dell department of marine and tropical biology james cook university townsville, qld 4811 australia [p] 07 47815751 or 47814520 [e] [EMAIL PROTECTED] [skype] anphony -Original Message- From: Rolf Turner

  1   2   >