[R] Warning message loading rmutil in R 2.5.0

2007-06-20 Thread Antonio J. Saez-Castillo
__ 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 and provide commented, minimal, self-contained, reproducible code.

Re: [R] plot only x- and y-axis with origin, no box()

2007-06-20 Thread Talloen, Willem [PRDBE]
Yes Greg, Your provided solution does the job; plot(5:10, 5:10, bty='n') library(TeachingDemos) lines(cnvrt.coords( c(0,0,.5), c(.5,0,0), input='plt')$usr) The easy way is indeed to do plot(.., bty='l') but this cannot be used in combination with fixing tickmarks and changing width of the

Re: [R] Preconditions for a variance analysis

2007-06-20 Thread Christoph Buser
Dear David Yes. There are assumptions that should be verified in an analysis of variance. Without checking them, the results are not reliable. I'd recommend e.g. Robert O. Kuehl, Design of Experiments: Statistical Principles of Research Design and Analysis, Duxbury Press, 2000 You will find

Re: [R] Speed up R

2007-06-20 Thread Stefan Grosse
Original Message Subject: Re:[R] Speed up R From: Matthew Keller [EMAIL PROTECTED] To: Robert McFadden [EMAIL PROTECTED] Date: 19.06.2007 23:09 but I think that windows has problems addressing that much RAM (surely the 64bit Vista is OK with it though... surely). Linux or

Re: [R] Could not find lmer function in {Matrix} package

2007-06-20 Thread Martin Maechler
SB == Steve Brady [EMAIL PROTECTED] on Tue, 19 Jun 2007 11:59:15 -0400 writes: SB I am having trouble calling the lmer function in the {Matrix} SB package. I first installed and loaded {Matrix} as follows: install.packages(Matrix) library(Matrix) SB The package

Re: [R] Matrix library error: should never happen; please report

2007-06-20 Thread Martin Maechler
Hi Jose, JQ == Jose Quesada [EMAIL PROTECTED] on Tue, 19 Jun 2007 21:12:53 +0200 writes: JQ Hi, I got the following error. Sorry but this time I JQ couldn't reproduce it with a simple chunk of code: .TM.repl.i.2col(): drop 'matrix' case ... Error in .nextMethod(x = x, i = i, j

Re: [R] plot only x- and y-axis with origin, no box()

2007-06-20 Thread Talloen, Willem [PRDBE]
perfect Romain, box( bty = l, lwd = 2 ) is the solution ! thank you all for your kind responses, willem -Original Message- From: Romain Francois [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20 June 2007 10:01 To: Talloen, Willem [PRDBE] Subject: Re: [R] plot only x- and y-axis with origin,

Re: [R] Preconditions for a variance analysis

2007-06-20 Thread Daniel Tahin
Thanx for your answer. I don't have the book, but found something on the web: http://www.basic.northwestern.edu/statguidefiles/oneway_anova.html and http://en.wikipedia.org/wiki/Analysis_of_variance#Assumptions Seems to be the same on both of the sites :-) Is this, that was meant? Thanx

[R] add line to data.frame

2007-06-20 Thread Manuele Pesenti
Dear R user, how can I update a data.frame adding new lines? I need to create a second data frame from a first one with only some of their entrys filtering the value of a specific column... How can I do this? thankyou very much in advance best regards Manuele PEsenti -- Manuele

Re: [R] add line to data.frame

2007-06-20 Thread Christophe Pallier
On 6/20/07, Manuele Pesenti [EMAIL PROTECTED] wrote: how can I update a data.frame adding new lines? rbind I need to create a second data frame from a first one with only some of their entrys filtering the value of a specific column... How can I do this? dtf2 - dtf1[dtf1$col=='xxx',]

Re: [R] Preconditions for a variance analysis

2007-06-20 Thread Christoph Buser
Dear David I'd not recommend the tests (for normality, equal variances) as they are described on your second link (wikipedia). I would use graphical tools such as Tukey-Anscombe Plot (residuals against fitted values), quantile (or normal) plot, leverage plot. see also ?plot.lm for some short

[R] xtable results doesn't correspond to data.frame

2007-06-20 Thread Vumani Dlamini
Dear useRs, Am trying to use xtable on the following data.frame and I don't get what I expect: example.table - data.frame(rbind( c(Gender, , , ), cbind(rep( ,2),c(Male,Female),c(3.0,4.0),c(3/7,4/7)) )) colnames(example.table) - c( , ,number of patients,%) example.xtable -

[R] Retrieve part of (top right corner) of a plot.data.frame plot?

2007-06-20 Thread Dan Bolser
Hi, I believe this question has been asked before, but I cant find and don't remember the answer. The problem is simple, calling 'plot.data.frame(x)' gives a nice 'matrix of scatterplots' for each pair of columns in x. for example; x - data.frame(a=jitter(01:20), b=jitter(20:01),

Re: [R] How to compare GLM and GAM models

2007-06-20 Thread Prof Brian Ripley
On Tue, 19 Jun 2007, Ben Bolker wrote: Yuanchang xie xieyc at hotmail.com writes: Dear Listers, I want to compare two negative binomial models fitted using glm.nb and gam(mgcv) based on the same data. What would be the most appropriate criteria to compare these two models? Can someone

Re: [R] plotting order of lines in xyplot panels while using conditioning variable and groups

2007-06-20 Thread RICHARD PITMAN
--- Deepayan Sarkar [EMAIL PROTECTED] wrote: On 6/19/07, RICHARD PITMAN [EMAIL PROTECTED] wrote: snip I have tried reordering the levels in data$group: data$group-factor(data$group, levels=c(CV_model_event_1,CV model event 2,CV event 1,CV_event_2,CV_event_2_CVA,CV_event_2_TIA))

[R] Got Unexpected ELSE error

2007-06-20 Thread Shiazy Fuzzy
Dear R-users, I have a problem with the IF-ELSE syntax. Please look at the folllowing code and tell me what's wrong: a - TRUE if ( a ) { cat(TRUE,\n) } else { cat(FALSE,\n) } If I try to execute with R I get: Error: syntax error, unexpected ELSE in else The strange thing is

Re: [R] Got Unexpected ELSE error

2007-06-20 Thread ONKELINX, Thierry
You need to put the else statement on the same line as the closing curly bracket. a - TRUE if ( a ){ cat(TRUE,\n) } else { cat(FALSE,\n) } Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur-

Re: [R] Got Unexpected ELSE error

2007-06-20 Thread Uwe Ligges
Shiazy Fuzzy wrote: Dear R-users, I have a problem with the IF-ELSE syntax. Please look at the folllowing code and tell me what's wrong: a - TRUE if ( a ) { cat(TRUE,\n) } At this point, the expression above is complete and it ios evaluated if called interactively. Then,

Re: [R] Got Unexpected ELSE error

2007-06-20 Thread Dimitris Rizopoulos
the problem is that you start `else' on a new line; check the following two solutions: if ( a ) { cat(TRUE, \n) } else { cat(FALSE, \n) } # or { if ( a ) { cat(TRUE, \n) } else { cat(FALSE, \n) } } I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student

Re: [R] Got Unexpected ELSE error

2007-06-20 Thread Shiazy Fuzzy
Thanks to everyone!! I've just looked up on the R Language Definition manual: ... When the if statement is not in a block the else, if present, must appear on the same line as statement1. Otherwise the new line at the end of statement1 yields a syntactically complete statement that is

Re: [R] How to compare GLM and GAM models

2007-06-20 Thread Simon Wood
On Wednesday 20 June 2007 10:34, Prof Brian Ripley wrote: On Tue, 19 Jun 2007, Ben Bolker wrote: Yuanchang xie xieyc at hotmail.com writes: Dear Listers, I want to compare two negative binomial models fitted using glm.nb and gam(mgcv) based on the same data. What would be the most

[R] non permanent change of vector values

2007-06-20 Thread Federico Calboli
Hi All, I have the following problem: I have a vector x = rep(0,15) x[1:2] = 1 x [1] 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 I need to be able to call that vector 'x' so that if condition 'A' is true, only the first value is kept 'as is' and all the others are put to 0 if(A == T) function(x) with x

Re: [R] Got Unexpected ELSE error

2007-06-20 Thread Peter Dalgaard
Shiazy Fuzzy wrote: Dear R-users, I have a problem with the IF-ELSE syntax. Please look at the folllowing code and tell me what's wrong: a - TRUE if ( a ) { cat(TRUE,\n) } else { cat(FALSE,\n) } If I try to execute with R I get: Error: syntax error, unexpected

[R] extract elements

2007-06-20 Thread Manuele Pesenti
Dear R users, just another little question... are there other ways, I mean more easy to write, to obtain the same result I got with: data[95:length(dati[,1]), ] where data is a data frame to extract the last elements starting from a fixed position? thank you very much best regards

Re: [R] xtable results doesn't correspond to data.frame

2007-06-20 Thread Stefan Grosse
It would be helpfull if you would state what exactly you did expect. As improvements you could reduce the digits, see ?xtable Original Message Subject: [R] xtable results doesn't correspond to data.frame From: Vumani Dlamini [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch

Re: [R] non permanent change of vector values

2007-06-20 Thread Duncan Murdoch
On 20/06/2007 6:46 AM, Federico Calboli wrote: Hi All, I have the following problem: I have a vector x = rep(0,15) x[1:2] = 1 x [1] 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 I need to be able to call that vector 'x' so that if condition 'A' is true, only the first value is kept 'as is' and

[R] Computing time differences

2007-06-20 Thread vincent . duval
Dear R users, I have a problem computing time differences using R. I have a date that are given using the following format: 20080620.00, where the 4 first digits represent the year, the next 2 ones the month and the last 2 ones the day. I would need to compute time differences between two

Re: [R] extract elements

2007-06-20 Thread Romain Francois
Manuele Pesenti wrote: Dear R users, just another little question... are there other ways, I mean more easy to write, to obtain the same result I got with: data[95:length(dati[,1]), ] where data is a data frame to extract the last elements starting from a fixed position? thank you very

Re: [R] extract elements

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Manuele Pesenti wrote: Dear R users, just another little question... are there other ways, I mean more easy to write, to obtain the same result I got with: data[95:length(dati[,1]), ] where data is a data frame to extract the last elements starting from a fixed

Re: [R] Computing time differences

2007-06-20 Thread Gabor Grothendieck
Try this and see the help desk article in R News 4/1: x - 20080620.00 x2 - 20090218.00 num2Date - function(x) as.Date(paste(x), %Y%m%d) num2Date(x2) - num2Date(x) Time difference of 243 days as.numeric(num2Date(x2) - num2Date(x)) [1] 243 On 6/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: [R] extract elements

2007-06-20 Thread Romain Francois
Romain Francois wrote: Manuele Pesenti wrote: Dear R users, just another little question... are there other ways, I mean more easy to write, to obtain the same result I got with: data[95:length(dati[,1]), ] where data is a data frame to extract the last elements starting from a fixed

Re: [R] Retrieve part of (top right corner) of a plot.data.frame plot?

2007-06-20 Thread Sébastien
Hi, That is maybe not the most elegant way but you can hide some plots regions by add a white polygon, eg: polygon(x=c(1,1,0,...),y=c(0,1,0,...),col=0,xpd=xpd) Just a personnal question, can you modify the content of the title boxes without changing the names of the variables, e.g.

[R] How to extract diagonals

2007-06-20 Thread Birgit Lemcke
Hello, I am using Mac OS X on a power book and R 2.5.0 I try to extract a diagonal from a dissimilarity matrix made with dsvdis, with this code: diag(DiTestRR) But I get this error message: Fehler in array(0, c(n, p)) : 'dim' spezifiziert ein zu großes Array english: Error in array(0,

Re: [R] xtable results doesn't correspond to data.frame

2007-06-20 Thread Stefan Grosse
Original Message Subject: Re:[R] xtable results doesn't correspond to data.frame From: Stefan Grosse [EMAIL PROTECTED] To: Vumani Dlamini [EMAIL PROTECTED] Date: 20.06.2007 12:20 Sorry, there is a line missing, I was asking what exactly was not as expected. As improvements

[R] Odp: extract elements

2007-06-20 Thread Petr PIKAL
Hi you can use tail tail(data, -95) gives you all but first 95 records. Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 20.06.2007 12:47:11: Dear R users, just another little question... are there other ways, I mean more easy to write, to obtain the same result I got

Re: [R] names over names

2007-06-20 Thread Jim Lemon
elyakhlifi mustapha wrote: Hello, I wonder if it's possible to put names above column names. Do you know if it's possible? If you mean something like this: Weekdays Monday Tuesday Wednesday Thursday Friday and you want it to be part of the data frame:

Re: [R] Retrieve part of (top right corner) of a plot.data.frame plot?

2007-06-20 Thread Dan Bolser
On 20/06/07, Sébastien [EMAIL PROTECTED] wrote: Hi, That is maybe not the most elegant way but you can hide some plots regions by add a white polygon, eg: polygon(x=c(1,1,0,...),y=c(0,1,0,...),col=0,xpd=xpd) Yeah, that is no good because it is the scale of the 'full' plot that is the real

[R] Linear Mixed Models with nlme, more than one random effect

2007-06-20 Thread Giulio Di Giovanni
Hi, I' trying to learn how to use lme for Linear Mixed Models and I have a problem when I have to include more than one random effect in my model. I know that this could be a stupid question to ask, but I'm not able to solve it by myself... One example: if my model is response = operator +

Re: [R] How to extract diagonals

2007-06-20 Thread Gavin Simpson
On Wed, 2007-06-20 at 13:26 +0200, Birgit Lemcke wrote: Hello, I am using Mac OS X on a power book and R 2.5.0 I try to extract a diagonal from a dissimilarity matrix made with dsvdis, with this code: diag(DiTestRR) But I get this error message: Fehler in array(0, c(n, p)) :

Re: [R] triangle contour plots

2007-06-20 Thread Cleber Borges
Hi, I used similar things to Chemical Mixture Modelling. ( Scheffe model) I make the function below. Cleber + trimage - function(f){ x = y = seq( 1, 0, l=181 ) t1 = length(x) im = aux = numeric(0) for( i in seq( 1, t1, by = 2 ) ){ #idx

Re: [R] Odp: Odp: outlying

2007-06-20 Thread Martin Maechler
[Note: CC'ing to R-SIG-robust, the Special Interest Group on using Robust Statistics in R ] PP == Petr PIKAL [EMAIL PROTECTED] on Tue, 19 Jun 2007 12:55:37 +0200 writes: PP [EMAIL PROTECTED] napsal dne 19.06.2007 PP 12:23:58: Hi It

[R] compiler cannot create executables

2007-06-20 Thread Robert Dunne
Hi List, I get an error message compiler cannot create executables when I try to install a package. Searching the list archives reveals many messages with the same error message. The advice is generally to install g++ and development libraries. However, I have g++ installed and can compile

Re: [R] How to extract diagonals

2007-06-20 Thread Birgit Lemcke
Hello Gavin and thanks for your answer. Your completely right I don´t need the diagonal that is the bisecting line of the angle. I need another diagonal of the (now) matrix. A1 A2 A3 A4 B1 B2 B3 B4 A1 A2 A3 A4 B1 X B2 X B3X B4

Re: [R] names over names

2007-06-20 Thread Richard M. Heiberger
If your data.frame is entirely numeric, then you could design a print function that builds on this example of converting it to a data.matrix: mydf - data.frame(Mon=1:3, Tue=4:6, Wed=7:9, Thu=10:12, Fri=13:15) mydm - data.matrix(mydf) names(dimnames(mydm)) - c(, Weekdays) mydm data.frame(mydm) ##

Re: [R] Linear Mixed Models with nlme, more than one random effect

2007-06-20 Thread joris . dewolf
Guilio, Have a look at Rnew volume 5/1 (http://cran.r-project.org/doc/Rnews/) where Doug Bates explains this nicely. Condider using lme4 for your purpose. Joris Giulio Di

[R] Creating directory under Windows R session

2007-06-20 Thread Milton Cezar Ribeiro
Hi all, How can I create (and check the existence of) a directory in a R session under Windows(xp)? Kind regards, Miltinho http://yahoo.com.br/oqueeuganhocomisso [[alternative HTML version

Re: [R] Creating directory under Windows R session

2007-06-20 Thread Benilton Carvalho
?dir.create b On Jun 20, 2007, at 8:07 AM, Milton Cezar Ribeiro wrote: Hi all, How can I create (and check the existence of) a directory in a R session under Windows(xp)? Kind regards, Miltinho __ R-help@stat.math.ethz.ch mailing list

Re: [R] Speed up R

2007-06-20 Thread Robert McFadden
-Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] The advantage of dual processors is that you can use the machine for several things at once, including multiple R jobs. For example, when I am doing package checking I am typically checking 4 packages at once

Re: [R] Speed up R

2007-06-20 Thread Mike Prager
Prof Brian Ripley [EMAIL PROTECTED] wrote: The advantage of dual processors is that you can use the machine for several things at once, including multiple R jobs. I've used dual-processor machines for about 10 years now and emphatically second the point made by Brian Ripley. Even if you are

Re: [R] Linear Mixed Models with nlme, more than one random effect

2007-06-20 Thread Giulio Di Giovanni
Thanks a lot !!! I was about to reply to my previous email that I found a solution via lme4 ! But really thanks. From: [EMAIL PROTECTED] To: Giulio Di Giovanni [EMAIL PROTECTED] CC: r-help@stat.math.ethz.ch, [EMAIL PROTECTED] Subject: Re: [R] Linear Mixed Models with nlme, more than one

Re: [R] Speed up R

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Robert McFadden wrote: -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] The advantage of dual processors is that you can use the machine for several things at once, including multiple R jobs. For example, when I am doing package checking I

Re: [R] compiler cannot create executables

2007-06-20 Thread Dirk Eddelbuettel
On Wed, Jun 20, 2007 at 10:25:07PM +1000, Robert Dunne wrote: Hi List, I get an error message compiler cannot create executables when I try to install a package. Searching the list archives reveals many messages with the same error message. The advice is generally to install g++ and

Re: [R] Dissimilarity

2007-06-20 Thread Birgit Lemcke
Hello Stephen, I am happy that you help me. Thanks a million. It is a good feeling that you confirm my assumption that dsvdis is not able to deal with missing data, because it says me that I am not completely incapable. Okay now I have the problem what to do. I used this function ´cause

Re: [R] Speed up R

2007-06-20 Thread Matthew Keller
Robert, I'm not exactly an expert, but here's what I think. If you have only 786 MB of RAM on your machine and you are using ~500 of it in a session of R, that could slow things down considerably because your machine is trying to find free blocks of memory that haven't been used yet. I would buy

Re: [R] Creating directory under Windows R session

2007-06-20 Thread Henrique Dallazuanna
for check the existence, any(dir('your path')==your folder) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 Ohttp://maps.google.com/maps?f=qhl=enq=Curitiba,+Brazillayer=ie=UTF8z=18ll=-25.448315,-49.276916spn=0.002054,0.005407t=kom=1 On 20/06/07, Milton Cezar Ribeiro

Re: [R] Dissimilarity Analysis

2007-06-20 Thread stephen cox
Hi Birgit - looks like you have a few issues here. Birgit Lemcke birgit.lemcke at systbot.uzh.ch writes: Hello you all! I am a completely new user of R and I have a problem to solve. I am using Mac OS X on a PowerBook. I have a table that looks like this: species X1 X2

Re: [R] Computing time differences

2007-06-20 Thread Stephen Tucker
Here is one way: Vector1 - c(20080621.00,20080623.00) Vector2 - c(20080620.00,20080622.00) do.call(difftime, c(apply(cbind(time1=Vector1,time2=Vector2),2, function(x) strptime(x,format=%Y%m%d.00)), units=hours)) see ?strptime, ?difftime and

Re: [R] Speed up R

2007-06-20 Thread David L. Van Brunt, Ph.D.
FWIW, I have a dual processor G5 Mac (not dual core... 2 separate, 2GHz processors-- not even made anymore, so you might find a deal if trying to save $$. If not, go for the octo-core Mac Pro--- 2 quad cores in one very expensive box). On my system I have found that with 5G RAM installed, I can

Re: [R] compiler cannot create executables

2007-06-20 Thread Dirk Eddelbuettel
On Wed, Jun 20, 2007 at 09:10:47AM -0500, Dirk Eddelbuettel wrote: On Wed, Jun 20, 2007 at 10:25:07PM +1000, Robert Dunne wrote: Hi List, I get an error message compiler cannot create executables when I try to install a package. Searching the list archives reveals many messages

Re: [R] genetics package not working

2007-06-20 Thread Farrel Buchinsky
From crawling around the internet it appears to me as if genetics has given way to GeneticsBase and is part of bioconductor. The basic data structure has changed to something called geneSet class. There is a pdf document that promises to help me.

[R] Enc: Creating directory under Windows R session

2007-06-20 Thread Milton Cezar Ribeiro
Hi all, How can I create (and check the existence of) a directory in a R session under Windows(xp)? Kind regards, Miltinho http://yahoo.com.br/oqueeuganhocomisso [[alternative HTML

[R] merge

2007-06-20 Thread elyakhlifi mustapha
hello, is it possible to merge 2 matrix or data.frame by roxnames? I checked details about the functino merge but I haven't fond this option. Can you help me please? thanks. _ [[alternative HTML version

Re: [R] merge

2007-06-20 Thread Weiwei Shi
if your nrow is not big, transpose and merge and transpose back. HTH, On 6/20/07, elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, is it possible to merge 2 matrix or data.frame by roxnames? I checked details about the functino merge but I haven't fond this option. Can you help me please?

Re: [R] merge

2007-06-20 Thread Kevin E. Thorpe
elyakhlifi mustapha wrote: hello, is it possible to merge 2 matrix or data.frame by roxnames? I checked details about the functino merge but I haven't fond this option. Can you help me please? thanks. The first paragraph of the Details section says: By default the data frames are merged on

Re: [R] Dissimilarity

2007-06-20 Thread Gavin Simpson
On Wed, 2007-06-20 at 16:13 +0200, Birgit Lemcke wrote: Hello Stephen, I am happy that you help me. Thanks a million. It is a good feeling that you confirm my assumption that dsvdis is not able to deal with missing data, because it says me that I am not completely incapable. Okay now

Re: [R] Enc: Creating directory under Windows R session

2007-06-20 Thread mel
?dir.create ?files hih __ 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 and provide commented, minimal, self-contained, reproducible code.

[R] merge

2007-06-20 Thread elyakhlifi mustapha
Hello, ok I know how to do to merge matrix or data.frame by row.names but my true objectif is to merge for example this data.frame: A obs Rép1 Rép2 Rép3 Rép4 Rép5 Rép6 Var1 145 145 150 145 140 145 Var2 150 150 160 155 155 150 Var3 155 155 160 150 150 140

Re: [R] How to extract diagonals

2007-06-20 Thread Gavin Simpson
On Wed, 2007-06-20 at 15:09 +0200, Birgit Lemcke wrote: Hello Gavin and thanks for your answer. Your completely right I dont need the diagonal that is the bisecting line of the angle. I need another diagonal of the (now) matrix. A1 A2 A3 A4 B1 B2 B3 B4 A1 A2 A3

[R] Multi-variate Probit model using Bayesm

2007-06-20 Thread Mahima Hada
Hello, I have built a multi-variate probit model using the package bayesm, which requires that the X data is constructed using the function CreateX. I've gone through the documentation and run my model, but wanted to be sure about my interpretation of the results for the coefficients - beta.

Re: [R] Creating directory under Windows R session

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Henrique Dallazuanna wrote: I have tested in WinXP: example: dir(C:/) [1] Arquivos de programas AUTOEXEC.BAT [3] boot.ini Bootfont.bin [5] CONFIG.SYSDebug [7] debug.log Desktop.ini [9] Dic

Re: [R] Creating directory under Windows R session

2007-06-20 Thread Prof Brian Ripley
On Wed, 20 Jun 2007, Henrique Dallazuanna wrote: for check the existence, any(dir('your path')==your folder) That does not work, but fortunately R has file_test() for this purpose. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics,

[R] How to draw several ROC curves on a common graph

2007-06-20 Thread Tirthadeep
library(ROCR) plot(roc1) plot(roc2) gives two plots on two different graph. Now i want to merge on a single graph. plot(roc1) points(roc2) Error in as.vector(x, double) : cannot coerce to vector any solution? -- View this message in context:

Re: [R] Creating directory under Windows R session

2007-06-20 Thread Henrique Dallazuanna
I have tested in WinXP: example: dir(C:/) [1] Arquivos de programas AUTOEXEC.BAT [3] boot.ini Bootfont.bin [5] CONFIG.SYSDebug [7] debug.log Desktop.ini [9] Dic Documents and Settings Dic is a

Re: [R] How to extract diagonals

2007-06-20 Thread Birgit Lemcke
Hello Gavin! I thank you so much that you help me here. Only to answer your questions there are 452 samples (species) in A and the same number in B. Unfortunately I will get the book from Legendre Legendre only in 2 days (small library) but I think for the moment I am busy to try and learn

Re: [R] add line to data.frame

2007-06-20 Thread John Kane
--- Manuele Pesenti [EMAIL PROTECTED] wrote: Dear R user, how can I update a data.frame adding new lines? ?rbind I need to create a second data frame from a first one with only some of their entrys filtering the value of a specific column... How can I do this? ?subset thankyou

Re: [R] xtable results doesn't correspond to data.frame

2007-06-20 Thread Stefan Grosse
That table below is not the table from your first mail. However I would do something like: library(xtable) testdata-data.frame(gender=c(rep(male,3),rep(female,4)) testtab-as.data.frame(table(testdata)) pct-function(x){ x/sum(x)*100 } testtab$percent-pct(testtab$Freq)

[R] nlme correlated random effects

2007-06-20 Thread Daniel O'Shea
I am examining the following nlme model. asymporig-function(x,th1,th2)th1*(1-exp(-exp(th2)*x)) mod1-nlme(fa20~(ah*habdiv+ad*log(d)+ads*ds+ads2*ds2+at*trout)+asymporig(da.p,th1,th2), fixed=ah+ad+ads+ads2+at+th1+th2~1, random=th1+th2~1,

Re: [R] How to extract diagonals

2007-06-20 Thread Gavin Simpson
On Wed, 2007-06-20 at 18:24 +0200, Birgit Lemcke wrote: Hello Gavin! I thank you so much that you help me here. Only to answer your questions there are 452 samples (species) in A and the same number in B. If your matrices are both 452x452 then distance() is going to take a while to crunch

[R] Averaging dates?

2007-06-20 Thread Sérgio Nunes
Hi, What's the best way to average dates? I though mean.POISXct would work fine but... a [1] 2007-04-02 19:22:00 WEST b [1] 2007-03-17 16:23:00 WET class(a) [1] POSIXt POSIXct class(b) [1] POSIXt POSIXct mean(a,b) [1] 2007-04-02 19:22:00 WEST mean(b,a) [1] 2007-03-17 16:23:00 WET ?!

[R] finding roots of multivariate equation

2007-06-20 Thread Bill Shipley
Hello, I want to find the roots of an equation in two variables. I am aware of the uniroot function, which can do this for a function with a single variable (as I understand it...) but cannot find a function that does this for an equation with more than one variable. I am looking for something

Re: [R] finding roots of multivariate equation

2007-06-20 Thread Ravi Varadhan
R does not really have a dedicated solver for nonlinear systems of equations, but instead you can use optim(), which is a minimizer. Suppose your system is F(x) = 0, where x \in R^p and F is a mapping from R^p to R^p, then you minimize the norm of F. The problem with this approach is that it can

Re: [R] Averaging dates?

2007-06-20 Thread Achim Zeileis
On Wed, 20 Jun 2007, Sérgio Nunes wrote: Hi, What's the best way to average dates? I though mean.POISXct would work fine but... a [1] 2007-04-02 19:22:00 WEST b [1] 2007-03-17 16:23:00 WET class(a) [1] POSIXt POSIXct class(b) [1] POSIXt POSIXct mean(a,b) [1] 2007-04-02

Re: [R] axis labels in multiple plots

2007-06-20 Thread Greg Snow
There are 2 approaches that should work for you (actually there are probably more, but these 2 are what I would suggest). The first is to wrap barplot in your own function that also adjusts the parameters and adds the axis. The other is to use the output from subplot to go back and annotate

[R] Testing parallel regression assumption

2007-06-20 Thread Medeiros, Rose
I would like to test the parallel regression assumption for an ordered logistic regression model using either a score/LM test, or preferably, a Wald/Brant test. I have been unable to find an R function (either in the base or in a package available on cran) that performs either of these tests. Does

[R] shoudl I use apply, sapply, etc instead of a for loop?

2007-06-20 Thread Thomas Pujol
I have been trying to learn the various apply functions but am still learning their appropriate use. I appreciate any help the R community can offer me. Sorry for the length of this post. Background: I have data on my hard drive organized in the following manner: The data pertains to many

Re: [R] axis labels in multiple plots

2007-06-20 Thread Héctor Villalobos
I followed the first approach, which is very close to the solution proposed by Marc Schwartz yesterday. Thanks a lot to both of you. Héctor Villalobos On 20 Jun 2007 at 12:08, Greg Snow wrote: There are 2 approaches that should work for you (actually there are probably more, but these 2

Re: [R] How to draw several ROC curves on a common graph

2007-06-20 Thread Dieter Menne
Tirthadeep sabya231 at gmail.com writes: library(ROCR) plot(roc1) plot(roc2) gives two plots on two different graph. Now i want to merge on a single graph. plot(roc1) points(roc2) Use parameter add=TRUE in all but the first call Dieter

[R] How to use mix to estimate the parameters for mixture gamma distribution?

2007-06-20 Thread Wang, Yun
Dear R users, Please help me on using mix function under package mixdist. My data distribution shows there are two components for the mixture distribution: left part is an exponential and right part is a normal. So I plan to use gamma mixture distribution to estimate the parameters. Here is

Re: [R] Dissimilarity

2007-06-20 Thread Mark Difford
Hi Birgit, Just to add to what Gavin has said. There are two other very powerful packages in R that handle this kind of thing: ade4 and vegan. Have a thorough look at both of them. You should be looking at Principal Coordinate Analysis (Classical Scaling) and Non Metric Multidimensional

[R] how to create cumulative histogram from two independent variables?

2007-06-20 Thread Jose Borreguero
Hi all, I am extremely newbie to R. Can anybody jump-start me with any clues as to how do I get a cumulative histogram from two independent variables, cumhist(X,Y) ? -jose [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing

[R] how to calculate estimate of interation contrast in two-factor experiment

2007-06-20 Thread szhan
Hello, R experts, I have a two-factor experiment data and like to calculate estimates of interation contrasts say factor A has levels of a1, a2, and B has levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the constrast estimate I got is right using the script below:

Re: [R] How to use mix to estimate the parameters for mixture gamma distribution?

2007-06-20 Thread Ben Bolker
Wang, Yun ywang at med.wayne.edu writes: Dear R users, Please help me on using mix function under package mixdist. My data distribution shows there are two components for the mixture distribution: left part is an exponential and right part is a normal. So I plan to use gamma mixture

Re: [R] Speed up R

2007-06-20 Thread Mike Prager
Matthew Keller [EMAIL PROTECTED] wrote: Robert, ... As for Mike Prager's point about the type of hard drive being important, I'm not sure this is right (someone correct me if I'm misunderstanding). R stores and accesses objects through RAM - they aren't stored and accessed on the hard drive

Re: [R] Speed up R

2007-06-20 Thread Matthew Keller
So Mike, let me ask you a question. If R runs out of RAM, does it begin to use virtual RAM, and hence begin to swap from the hard drive? If so, I could see how a faster hard drive would speed R up when you don't have enough RAM... On 6/20/07, Mike Prager [EMAIL PROTECTED] wrote: Matthew Keller

[R] How to create .rda file to be used in package building

2007-06-20 Thread Deli Wang
Hi, Can someone tell me how to create .rda data files in R so that they can be used contributed package? Thanks Deli Wang [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

[R] Extracting t-tests on coefficients in lm

2007-06-20 Thread David C. Howell
I am writing a resampling program for multiple regression using lm(). I resample the data 10,000 times, each time extracting the regression coefficients. At present I extract the individual regression coefficients using brg = lm(Newdv~Teach + Exam + Knowledge + Grade + Enroll) bcoef[i,] =

[R] Creatiing an R package for solving nonlinear system of equations was: RE: finding roots of multivariate equation

2007-06-20 Thread Ravi Varadhan
Hi All, Replying to this and numerous other requests in the past has made me realize that a nonlinear solver is very much needed for R users. I have successfully used a nonlinear solver based on the spectral gradient method, in FORTRAN. I can readily translate that to R and make it available as

Re: [R] Averaging dates?

2007-06-20 Thread jim holtman
You need to call 'mean.POSIXct' with a single vector: a [1] 2007-01-01 12:00:00 GMT b [1] 2007-07-01 14:22:00 GMT mean(c(a,b)) [1] 2007-04-02 01:11:00 GMT On 6/20/07, Sérgio Nunes [EMAIL PROTECTED] wrote: Hi, What's the best way to average dates? I though mean.POISXct would work fine

Re: [R] Retrieve part of (top right corner) of a plot.data.frame plot?

2007-06-20 Thread Deepayan Sarkar
On 6/20/07, Dan Bolser [EMAIL PROTECTED] wrote: Hi, I believe this question has been asked before, but I cant find and don't remember the answer. The problem is simple, calling 'plot.data.frame(x)' gives a nice 'matrix of scatterplots' for each pair of columns in x. for example; x -

[R] Replace number with month

2007-06-20 Thread Spilak,Jacqueline [Edm]
Hi all I have a multiple datasets that look like this MM Freq 1 30 2 35 3 54 4 33 5 27 6 13 7 25 8 29 9 40 10 32 11 36 12 23 I am plotting this using barchart (there is probably something better but it gives me the results I

  1   2   >