[R] problem with working on R-Project from C#

2009-01-07 Thread venkata kirankumar
Hi, i got a problem with initialising R-Project from C# in this i m sending what are all the code line I had been written and the error where i got sc1 = new STATCONNECTORSRVLib.StatConnector(); sc1.Init(R); and error at SCN_E_INVALIDINTERPRETERVERSION -2147221487 0x80040011 can any one

Re: [R] Sweave in LATEX

2009-01-07 Thread Mr Derik
I have solved the problem. It seems that the \Sexpr{} sequence is processed by R rather than latex. If you use: Sweave(Sweave-test-1.Rnw, syntax=SweaveSyntaxNoweb) When processing in R then this is handled in the appropriate way. Duncan Murdoch-2 wrote: On 1/6/2009 6:44 AM, Mr Derik

[R] request for StatConnecter oriented problem

2009-01-07 Thread venkata kirankumar
hi, i got a problem with initialising R-Project from C# in this i m sending what are all the code line I had been written and the error where i got sc1 = new STATCONNECTORSRVLib.StatConnector(); sc1.Init(R); and error at SCN_E_INVALIDINTERPRETERVERSION -2147221487 0x80040011 can any one

Re: [R] Two Noobie questions

2009-01-07 Thread Simon Pickett
Allen, I would suggest reading about the str() function. It's great for getting inside model outputs and seeing how they are constructed so you can extract all the specific calculations you want. Its a bit fiddly to get used to but there are plenty of examples on this forum. Hope this

[R] Importing data from SPSS with Arabic encoding

2009-01-07 Thread Florent Bresson
Dear R-users, I'm facing a problem with the import of data in R. I have a sav file that, I presume, uses some Arabic encoding (but I don't know which one) and I would like to read it with R. When I use the function read.spss (I also tried spss.get(Hmisc)), I get the following message:

Re: [R] Importing data from SPSS with Arabic encoding

2009-01-07 Thread Prof Brian Ripley
On Wed, 7 Jan 2009, Florent Bresson wrote: Dear R-users, I'm facing a problem with the import of data in R. I have a sav file that, I presume, uses some Arabic encoding (but I don't know which one) and I would like to read it with R. When I use the function read.spss (I also tried

Re: [R] Large Dataset

2009-01-07 Thread Thomas Lumley
There are several approaches to analyzing data sets much larger than memory, and the best approach does depend on the problem. It's certainly possible to process gigabytes of data on a 32-bit R system - the examples I've worked on are whole-genome association studies with 10^5-10^6 variables

[R] Re : Importing data from SPSS with Arabic encoding

2009-01-07 Thread Florent Bresson
Thanks Brian for your help. I am sorry, I should have red the help page more carefully. I am working on Kubuntu 8.04 with R 2.8.0. The problem with the file is that I do not know what the encoding is. I do not understand what you mean with [...] but most likely the output before the error which

Re: [R] Subscript

2009-01-07 Thread Timthy Chang
A similar question: mtext(text=log2 intensity ) How can I change 2 to be subscript? (see picture below) http://www.nabble.com/file/p21326192/log2_intensity.jpg -- View this message in context: http://www.nabble.com/Subscript-tp12241351p21326192.html Sent from the R help mailing list

[R] Help with contrasts

2009-01-07 Thread Paschal
Hello All R Gurus I'm a relatively new user to R and I'm having so problems fully grasping the contrasts notion. So any help will be appreciated. Lately I've been playing around with lme and I was looking at the help files of anova.lme where there is this example options(contrasts =

[R] A (Not So) Short Introduction to S4 (ex Contributed Documentation)

2009-01-07 Thread Christophe Genolini
Here is the link : http://christophe.genolini.free.fr/webTutorial/index.php Any comments are welcome. Christophe On Tue, Jan 6, 2009 at 8:17 PM, Ben Bolker bol...@ufl.edu wrote: Christophe Genolini cgenolin at u-paris10.fr writes: Hi the list, I wrote a tutorial about S4. Is

Re: [R] Subscript

2009-01-07 Thread Henrique Dallazuanna
Try this: mtext(text=bquote(log[2]~intensity)) On Wed, Jan 7, 2009 at 5:36 AM, Timthy Chang henchao.ch...@gmail.comwrote: A similar question: mtext(text=log2 intensity ) How can I change 2 to be subscript? (see picture below) http://www.nabble.com/file/p21326192/log2_intensity.jpg --

Re: [R] for loop and if problem

2009-01-07 Thread Sake
Sake wrote: Hi, I'm heaving difficulties with a dataset containing gene names and positions of those genes. Not such a big problem, but each gene has multiple exons so it's hard to say where de gene starts and where it ends. I want the starting and ending position of each gene in my

[R] can the pdf output page break be controlled manually?

2009-01-07 Thread Mark Heckmann
I would like to control where to make a page break in my pdf file. The following code renders three pages of output. But I would like to be able to control the page breaks. pdf(file=test.pdf, paper=a4) par(mfrow=c(2,2)) hist(rnorm(100)) hist(rnorm(100)) hist(rnorm(100))

Re: [R] Subscript

2009-01-07 Thread Dimitris Rizopoulos
try something like this: plot(0:1, 0:1, type = n) text(0.5, 0.5, expression(paste(plain(log)[2], intensity))) and check ?plotmath for more info. I hope it helps. Best, Dimitris Timthy Chang wrote: A similar question: mtext(text=log2 intensity ) How can I change 2 to be subscript? (see

Re: [R] Re : Importing data from SPSS with Arabic encoding

2009-01-07 Thread Prof Brian Ripley
Florent Bresson wrote: Thanks Brian for your help. I am sorry, I should have red the help page more carefully. I am working on Kubuntu 8.04 with R 2.8.0. The problem with the file is that I do not know what the encoding is. I do not understand what you mean with [...] but most likely the

[R] NA and NaN question

2009-01-07 Thread Pascal A. Niklaus
Hi all, I ran into a problem in some of my code that could be traced back to 'mean' sometimes returning NA and sometimes NaN, depending on the value of na.rm: mean(c()) [1] NA mean(c(NA),na.rm=T) [1] NaN However, I don't understand the reasoning behind this and would appreciate and

Re: [R] R-help Digest, Vol 71, Issue 7

2009-01-07 Thread Christophe Genolini
Thanks for your answer Here it is : http://christophe.genolini.free.fr/webTutorial/index.php Any comments are welcome... Christophe __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] for loop and if problem

2009-01-07 Thread Gabor Grothendieck
On Wed, Jan 7, 2009 at 3:51 AM, Sake tlep.nav.e...@hccnet.nl wrote: aggregate(data[, c(Exon_Start.Chr.)], by = list(data$Gene), min) aggregate(data[, c(Exon_Stop.Chr.)], by = list(data$Gene), max) That could be written: aggregate(data[Excon_Start.Chr.], data[Gene], min)

[R] illustrating a report

2009-01-07 Thread Wydou
Hi all I would like to know a bit more about illustrating an a4 page within R. Finally I would like to have a pdf with multiple pages containing some statistics. I'm already able to produce a pdf, containing a plot in the center of one a4 page. As a next step I would like to set a title on top

Re: [R] NA and NaN question

2009-01-07 Thread Prof Brian Ripley
Pascal A. Niklaus wrote: Hi all, I ran into a problem in some of my code that could be traced back to 'mean' sometimes returning NA and sometimes NaN, depending on the value of na.rm: mean(c()) [1] NA mean(c(NA),na.rm=T) [1] NaN However, I don't understand the reasoning behind this and

Re: [R] NA and NaN question

2009-01-07 Thread Wacek Kusnierczyk
Pascal A. Niklaus wrote: Hi all, I ran into a problem in some of my code that could be traced back to 'mean' sometimes returning NA and sometimes NaN, depending on the value of na.rm: mean(c()) [1] NA mean(c(NA),na.rm=T) [1] NaN However, I don't understand the

Re: [R] illustrating a report

2009-01-07 Thread Philipp Pagel
I would like to know a bit more about illustrating an a4 page within R. Finally I would like to have a pdf with multiple pages containing some statistics. I'm already able to produce a pdf, containing a plot in the center of one a4 page. As a next step I would like to set a title on top of

Re: [R] NA and NaN question

2009-01-07 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: Pascal A. Niklaus wrote: Hi all, I ran into a problem in some of my code that could be traced back to 'mean' sometimes returning NA and sometimes NaN, depending on the value of na.rm: mean(c()) [1] NA mean(c(NA),na.rm=T)

Re: [R] Duplicated messages

2009-01-07 Thread Martin Maechler
BertG == Bert Gunter gunter.ber...@gene.com on Tue, 6 Jan 2009 10:13:29 -0800 writes: BertG Folks: I am getting duplicate messages on BertG posts. Please correct my details if I'm wrong, but I BertG believe it's because folks are posting to **both** BertG the addresses,

[R] R in the NY Times

2009-01-07 Thread Zaslavsky, Alan M.
This article is accompanied by nice pictures of Robert and Ross. Data Analysts Captivated by Power of R http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html January 7, 2009 Data Analysts Captivated by R’s Power By ASHLEE VANCE To some people R is just the 18th letter

Re: [R] R Threatens SAS According to The NYT

2009-01-07 Thread Martin Maechler
ao == ajay ohri ajayo...@yahoo.com on Wed, 7 Jan 2009 11:07:13 +0530 writes: ao On Wed, Jan 7, 2009 at 11:05 AM, ajay ohri ao ajayo...@yahoo.com wrote: FYI..not a R -Help Topic, buy I dont know which list to post discussions like this. Regards, Ajay R-help is

Re: [R] R in the NY Times

2009-01-07 Thread Bill Pikounis
Pardon my exuberance, but this is simply awesome. What a treat to find on the front web page of the NY Times this morning under Technology. I think the article is very well written by the author, and I think it captures top highlights of why the software and community are so special. Continued

Re: [R] can the pdf output page break be controlled manually?

2009-01-07 Thread jim holtman
Try just leaving off the 'plot.new()'; When you change mfrow it creates a new page. On Wed, Jan 7, 2009 at 5:01 AM, Mark Heckmann mark.heckm...@gmx.de wrote: I would like to control where to make a page break in my pdf file. The following code renders three pages of output. But I would like to

Re: [R] R in the NY Times

2009-01-07 Thread Frank E Harrell Jr
This is great to see. It's interesting that SAS Institute feels that non-peer-reviewed software with hidden implementations of analytic methods that cannot be reproduced by others should be trusted when building aircraft engines. Frank Zaslavsky, Alan M. wrote: This article is accompanied

Re: [R] can the pdf output page break be controlled manually?

2009-01-07 Thread Duncan Murdoch
On 1/7/2009 5:01 AM, Mark Heckmann wrote: I would like to control where to make a page break in my pdf file. The following code renders three pages of output. But I would like to be able to control the page breaks. pdf(file=test.pdf, paper=a4) par(mfrow=c(2,2)) hist(rnorm(100))

Re: [R] R in the NY Times

2009-01-07 Thread Frank E Harrell Jr
Bill Pikounis wrote: Pardon my exuberance, but this is simply awesome. What a treat to find on the front web page of the NY Times this morning under Technology. I think the article is very well written by the author, and I think it captures top highlights of why the software and community are so

Re: [R] R in the NY Times

2009-01-07 Thread Simon Pickett
I would like to add that I would have spent many more years doing my PhD if it wasnt for R! all data management, statistics and graphics were conducted using it. This was the direction my university and many more research institutes appear to be heading. It probably doesnt get said enough and

Re: [R] R in the NY Times

2009-01-07 Thread Kevin E. Thorpe
Zaslavsky, Alan M. wrote: This article is accompanied by nice pictures of Robert and Ross. Data Analysts Captivated by Power of R http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html January 7, 2009 Data Analysts Captivated by R’s Power By ASHLEE VANCE SAS says

[R] R in the NY Times-IAsians perspective

2009-01-07 Thread Ajay ohri
R and its GUI Rattle helped me establish a data mining consulting startup on my own, without taking bank credit . People I met on the forum and especially books like rforsasandspssusers.com/ http://rforsasandspssusers.com/ helped me ease the transition to the new Object Oriented method from the

Re: [R] R in the NY Times

2009-01-07 Thread Marc Schwartz
on 01/07/2009 08:44 AM Kevin E. Thorpe wrote: Zaslavsky, Alan M. wrote: This article is accompanied by nice pictures of Robert and Ross. Data Analysts Captivated by Power of R http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html January 7, 2009 Data Analysts

[R] Frailty by strata interactions in coxph ( or coxme)‏

2009-01-07 Thread Christos Argyropoulos
Hello, I was hoping that someone could answer a few questions for me (the background is given below): 1) Can the coxph accept an interaction between a covariate and a frailty term 2) If so, is it possible to a) test the model in which the covariate and the frailty appear as main terms using

Re: [R] about randomForest

2009-01-07 Thread Liaw, Andy
Apologies for catching this so late. Have been out for a few weeks and still trying to recover from that... From: Jim Porzak Hi Wanghong, Unless you have a huge linux box, you will need to sample down your 300k rows to a few thousand. In marketing aps, I often have data sets of

[R] Extracting degrees of freedom from a gnls object

2009-01-07 Thread Christoph Scherber
Dear all, How can I extract the total and residual d.f. from a gnls object? I have tried str(summary(gnls.model)) and str(gnls.model) as well as gnls(), but couldn´t find the entry in the resulting lists. Many thanks! Best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of

Re: [R] NA and NaN question

2009-01-07 Thread Pascal A. Niklaus
Thanks, now I understand what's happening. Maybe a line explaining this could be added to the help text for mean? Pascal Niklaus On Wed 07-Jan-2009 13:29:25 Prof Brian Ripley wrote: Pascal A. Niklaus wrote: Hi all, I ran into a problem in some of my code that could be traced back to

Re: [R] R Stacked Histogram

2009-01-07 Thread Jason Rupert
That worked!  Thank you very much for the help.   I think I have one last question about qplot in ggplot2, That is exporting the plot to JPG while in a loop.   I tried what was recommended in Re: [R] jpeg() creating empty files with qplot() in a loop, however, I received some errors (see

Re: [R] R Stacked Histogram

2009-01-07 Thread hadley wickham
On Wed, Jan 7, 2009 at 7:55 AM, Jason Rupert jasonkrup...@yahoo.com wrote: That worked! Thank you very much for the help. I think I have one last question about qplot in ggplot2, That is exporting the plot to JPG while in a loop. I tried what was recommended in Re: [R] jpeg() creating

Re: [R] R in the NY Times

2009-01-07 Thread Tony Breyal
Thank you for posting this, I found it a very enjoyable read! I am curious, is there an archive of 'R in the Media' or 'R in the Press' articles somewhere? It would be interesting to see how the perception of R has changed/evolved over time relative to other packages. Cheers, Tony Breyal On 7

[R] Question about the RWEKA package

2009-01-07 Thread Häring, Tim (LWF)
Dear List, I´m trying to implement the functionalities from WEKA into my modeling project in R through the RWeka package. In this context I have a slightly special question about the filters implemented in WEKA. I want to convert nominal attributes with k values into k binary attributes

Re: [R] Extracting degrees of freedom from a gnls object

2009-01-07 Thread Marc Schwartz
on 01/07/2009 09:01 AM Christoph Scherber wrote: Dear all, How can I extract the total and residual d.f. from a gnls object? I have tried str(summary(gnls.model)) and str(gnls.model) as well as gnls(), but couldn´t find the entry in the resulting lists. Many thanks! Best wishes

Re: [R] R in the NY Times

2009-01-07 Thread Rubén Roa-Ureta
Zaslavsky, Alan M. wrote: This article is accompanied by nice pictures of Robert and Ross. Data Analysts Captivated by Power of R http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html Thanks for the heads up. The R morale is going through the roof! I've given

Re: [R] R in the NY Times

2009-01-07 Thread Jeffrey J. Hallman
The article quotes John Chambers, but it doesn't mention that R started out as an implementation of the S language. I don't suppose Insightful is too happy about that. The SAS spokesman quoted in the article is clearly whistling past the graveyard. -- Jeff

Re: [R] R in the NY Times

2009-01-07 Thread Darin A. England
On Wed, Jan 07, 2009 at 08:00:28AM -0600, Frank E Harrell Jr wrote: This is great to see. It's interesting that SAS Institute feels that non-peer-reviewed software with hidden implementations of analytic methods that cannot be reproduced by others should be trusted when building aircraft

Re: [R] R in the NY Times

2009-01-07 Thread Duncan Murdoch
On 1/7/2009 9:44 AM, Kevin E. Thorpe wrote: Zaslavsky, Alan M. wrote: This article is accompanied by nice pictures of Robert and Ross. Data Analysts Captivated by Power of R http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html January 7, 2009 Data Analysts

[R] rbind for matrices - rep argument

2009-01-07 Thread Niccolò Bassani
Dear R users,I'm facing a trivial problem, but I really can't solve it. I've tried a dozen of codes, but I can't get the result I want. The question is: I have a dataframe like this one [,1] [,2] [,3] [,4] [,5] [1,]12345 [2,]25549 [3,]1681

Re: [R] R in the NY Times

2009-01-07 Thread Peter Dalgaard
Jeffrey J. Hallman wrote: The article quotes John Chambers, but it doesn't mention that R started out as an implementation of the S language. I don't suppose Insightful is too happy about that. You mean Tibco... The statement that S failed to generate broad interest is also a bit misleading.

Re: [R] R in the NY Times

2009-01-07 Thread Max Kuhn
You can look on the SAS message boards and see there is a proportional downturn in traffic. I think that I actually made this statement about both the SAS and Splus traffic... I wasn't really trying to be critical of SAS. I was trying to get across that SAS focused their resources on features

Re: [R] rbind for matrices - rep argument

2009-01-07 Thread Dimitris Rizopoulos
you can use indexing, e.g., mat - matrix(rnorm(20), 4, 5) mat mat[rep(1:nrow(mat), 3), ] I hope it helps. Best, Dimitris Niccolò Bassani wrote: Dear R users,I'm facing a trivial problem, but I really can't solve it. I've tried a dozen of codes, but I can't get the result I want. The

[R] Replace Function (How to replace numbers in a data frame with a specific number)

2009-01-07 Thread stephen sefick
taxa - (structure(list(Date = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c(2006/04, 2006/05, 2006/07, 2006/10, 2006/12, 2007/02, 2007/04, 2007/06, 2007/08, 2007/10, 2007/12, 2008/01), class = factor), RiverMile = c(61L, 119L, 148L,

Re: [R] rbind for matrices - rep argument

2009-01-07 Thread Henrique Dallazuanna
Try this: m[rep(seq_len(nrow(m)), 3),] On Wed, Jan 7, 2009 at 1:22 PM, Niccolò Bassani biostatist...@gmail.comwrote: Dear R users,I'm facing a trivial problem, but I really can't solve it. I've tried a dozen of codes, but I can't get the result I want. The question is: I have a dataframe

Re: [R] rbind for matrices - rep argument

2009-01-07 Thread Ben Bolker
Dimitris Rizopoulos d.rizopoulos at erasmusmc.nl writes: you can use indexing, e.g., mat - matrix(rnorm(20), 4, 5) mat mat[rep(1:nrow(mat), 3), ] I hope it helps. Best, Dimitris or matrix trickery: z - as.data.frame(matrix(sample(1:9,20,replace=TRUE),nrow=4))

Re: [R] rbind for matrices - rep argument

2009-01-07 Thread Carlos J. Gil Bellosta
On Wed, 2009-01-07 at 16:22 +0100, Niccolò Bassani wrote: Dear R users,I'm facing a trivial problem, but I really can't solve it. I've tried a dozen of codes, but I can't get the result I want. The question is: I have a dataframe like this one [,1] [,2] [,3] [,4] [,5] [1,]123

[R] Cannot access packages

2009-01-07 Thread JLucke
Although I have installed R many times on many machines without problems, I have recently encountered a problem with accessing packages. R has been installed successfully with the --internet2 option. The session info is below. sessionInfo() R version 2.8.1 (2008-12-22) i386-pc-mingw32

Re: [R] Replace Function (How to replace numbers in a data frame with a specific number)

2009-01-07 Thread stephen sefick
very good thanks On Wed, Jan 7, 2009 at 11:18 AM, Henrique Dallazuanna www...@gmail.com wrote: Try this: taxa[, 5:9][taxa[,5:9] 0] - 1 On Wed, Jan 7, 2009 at 1:36 PM, stephen sefick ssef...@gmail.com wrote: taxa - (structure(list(Date = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,

Re: [R] Replace Function (How to replace numbers in a data frame with a specific number)

2009-01-07 Thread Henrique Dallazuanna
Try this: taxa[, 5:9][taxa[,5:9] 0] - 1 On Wed, Jan 7, 2009 at 1:36 PM, stephen sefick ssef...@gmail.com wrote: taxa - (structure(list(Date = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c(2006/04, 2006/05, 2006/07, 2006/10,

Re: [R] R in the NY Times

2009-01-07 Thread David M Smith
On Wed, Jan 7, 2009 at 6:39 AM, Tony Breyal tony.bre...@googlemail.com wrote: Thank you for posting this, I found it a very enjoyable read! I am curious, is there an archive of 'R in the Media' or 'R in the Press' articles somewhere? It would be interesting to see how the perception of R has

Re: [R] R in the NY Times

2009-01-07 Thread Bryan Hanson
I believe the SAS person shot themselves in the foot more in more ways than one. In my mind, the reason you would pay, as Frank said, for non-peer-reviewed software with hidden implementations of analytic methods that cannot be reproduced by others Would be so that you can sue them later

[R] Problem with ggplot2 - facet_wrap and boxplot

2009-01-07 Thread David Hajage
Hello R users and Hadley, Back again with a little problem in ggplot2 =o) (ggplot 0.8.1, R 2.8.0) Here the problem : library(ggplot2) df - data.frame(id = 1:100, x1 = c(rnorm(50), rnorm(50, 1)), x2 = c(rnorm(50), rnorm(50, 1.5)), x3 = c(rnorm(50, 0.5), rnorm(50, 2.5)), group =

Re: [R] heatmap.2 and three colours for specific ran gesþ

2009-01-07 Thread YH Deng
a-matrix(rnorm(36,1,3),6,6) ifelse(a(-1),1,ifelse(a=1a=-1,2,3)) heatmap.2(a, col=rev(redgreen(3))) HTH -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Daren Tan Sent: January 6, 2009 11:53 PM To: r-help@r-project.org Subject: [R]

Re: [R] R in the NY Times

2009-01-07 Thread Marc Schwartz
I would also point out that the use of the term freeware as opposed to FOSS by the SAS rep, comes off as being unprofessional and deliberately condescending... The author of the article, to his credit, was pretty consistent in using open source terminology. Regards, Marc on 01/07/2009 10:26 AM

Re: [R] smoothed contour lines

2009-01-07 Thread Greg Snow
Here is one possible approach to get you started (this is not a final answer): x - seq(-3,3) y - seq(-3,3) z - outer(x,y, function(x,y,...) x^2 + y^2 ) tmp - contourLines(x,y,z) contour(x,y,z, lty=0) lapply(tmp, function(l) { x - l$x y - l$y if( length(x) 2 ){

Re: [R] Question about the RWEKA package

2009-01-07 Thread Achim Zeileis
On Wed, 7 Jan 2009, Häring, Tim (LWF) wrote: Dear List, I´m trying to implement the functionalities from WEKA into my modeling project in R through the RWeka package. In this context I have a slightly special question about the filters implemented in WEKA. I want to convert nominal

Re: [R] R Threatens SAS According to The NYT

2009-01-07 Thread Martin Maechler
MM == Martin Maechler maech...@stat.math.ethz.ch on Wed, 7 Jan 2009 14:18:24 +0100 writes: [..] MM At the bottom of the page it says MM __ A version of this article appeared in print on MM January 7, 2009, __ on page B6 of the New York edition. MM Now if any

Re: [R] Problem with ggplot2 - facet_wrap and boxplot

2009-01-07 Thread hadley wickham
Hi David, Here the problem : library(ggplot2) df - data.frame(id = 1:100, x1 = c(rnorm(50), rnorm(50, 1)), x2 = c(rnorm(50), rnorm(50, 1.5)), x3 = c(rnorm(50, 0.5), rnorm(50, 2.5)), group = as.factor(rep(c(a, b), each = 50))) df.melt - melt(df, id = c(id, group)) head(df.melt) p -

[R] Multinomial Logit Model

2009-01-07 Thread ryan
I'm attempting to creat multinomial logistic regression model using the following code: mlogit- vglm(ME ~ HIST,family=multinomial(),na.action = na.pass) ME (dependent variable) has three levels (0,1,2) How do I declare a reference outcome (either 0,1,2)?

Re: [R] R in the NY Times

2009-01-07 Thread Andrew Choens
Unfortunately, that type of FUD issued by the SAS marketing person still works. I see it at my employer (a large healthcare company.) It's a battle to change a culture, but ironically the recession helps. People are now taking notice of the obscene licensing fees for SAS. Darin I agree. I

Re: [R] rbind for matrices - rep argument

2009-01-07 Thread Ted Harding
On 07-Jan-09 15:22:57, Niccolò Bassani wrote: Dear R users,I'm facing a trivial problem, but I really can't solve it. I've tried a dozen of codes, but I can't get the result I want. The question is: I have a dataframe like this one [,1] [,2] [,3] [,4] [,5] [1,]12345

Re: [R] R Stacked Histogram

2009-01-07 Thread Jason Rupert
Sweet!  The missing e.  That was it!  Yeah!  Thanks again.   I guess I will get some sleep tonight.    Well, one last questions about stack plot (please forgive the lame example below).  I thought the below allow me to resize the the title of the stacked histogram, but no luck.  Any

[R] proto question

2009-01-07 Thread Simon Knapp
Dear R Users, I have a couple of proto objects like: wedge - proto(expr={ start.year - 2008 end.year - 2050 }) star.rating - wedge$proto( star = c(4, 5, 8, 10), gain = c(0, .3, .5, .7), cost = c(0, 2100, 4000, 7500), star.rating - function(., year)

[R] New York Times Article: Data Analysts Captivated by R's Power

2009-01-07 Thread Arthur Burke
Readers of this list might be interested in the following article in the New York Times and might find amusing the notion that Some people familiar with R describe it as a supercharged version of Microsoft's Excel spreadsheet software

[R] how to estimate overdispersion in glmer models?

2009-01-07 Thread lcayuela
Dear all, I am using function glmer from package lme4 to fit a generalized linear mixed effect model. My model is as follows: model1 - glmer(fruitset ~ Dist*wire + (1|Site), data, binomial) summary(model1) Generalized linear mixed model fit by the Laplace approximation Formula: fruitset ~ Dist

Re: [R] Fw: Re: R Stacked Histogram

2009-01-07 Thread hadley wickham
Hi Jason, Well, one last questions about stack plot (please forgive the lame example below). I thought the below allow me to resize the the title of the stacked histogram, but no luck. Any suggestions as to the modificaiton necessary to get it to work? Right now the title is obscured by

Re: [R] rbind for matrices - rep argument

2009-01-07 Thread Patrick Burns
Ben Bolker wrote: Dimitris Rizopoulos d.rizopoulos at erasmusmc.nl writes: you can use indexing, e.g., mat - matrix(rnorm(20), 4, 5) mat mat[rep(1:nrow(mat), 3), ] I hope it helps. Best, Dimitris or matrix trickery: z - as.data.frame(matrix(sample(1:9,20,replace=TRUE),nrow=4))

Re: [R] R in the NY Times

2009-01-07 Thread Ajay ohri
you can use google alerts to track media coverage of R using some keywords regards, ajay On Wed, Jan 7, 2009 at 9:52 PM, David M Smith da...@revolution-computing.com wrote: On Wed, Jan 7, 2009 at 6:39 AM, Tony Breyal tony.bre...@googlemail.com wrote: Thank you for posting this, I found

Re: [R] R in the NY Times

2009-01-07 Thread Ted Harding
On 07-Jan-09 18:03:19, Erik Iverson wrote: I pointed a friend of mine toward the article, to which he replied: I hope that they run SAS on Solaris too, god only knows how tainted the syscalls are in that linux freeware. Of course, now Solaris is 'freeware', too, so I suppose that

Re: [R] R in the NY Times

2009-01-07 Thread Barry Rowlingson
2009/1/7 Darin A. England engl...@cs.umn.edu: Unfortunately, that type of FUD issued by the SAS marketing person still works. I see it at my employer (a large healthcare company.) I see it here, at a university. Quote: We couldn't possibly do our analysis using some software we've just

Re: [R] Problem with ggplot2 - facet_wrap and boxplot

2009-01-07 Thread David Hajage
o. Well, it's working (replace 'group' by 'trt') Thank you very much Hadley. david 2009/1/7 hadley wickham h.wick...@gmail.com Hi David, Here the problem : library(ggplot2) df - data.frame(id = 1:100, x1 = c(rnorm(50), rnorm(50, 1)), x2 = c(rnorm(50), rnorm(50, 1.5)), x3 =

[R] generating data

2009-01-07 Thread berzasca
How do I simulate data with 100 points from a normal distribution with n=200, mean (5,0), and Σ=matrix(1,0,0,0.1). After how do I plot the dataset and include cluster centers found? -- View this message in context: http://www.nabble.com/generating-data-tp21337173p21337173.html Sent from the R

Re: [R] Cannot access packages

2009-01-07 Thread Uwe Ligges
jlu...@ria.buffalo.edu wrote: Although I have installed R many times on many machines without problems, I have recently encountered a problem with accessing packages. R has been installed successfully with the --internet2 option. The session info is below. sessionInfo() R version 2.8.1

Re: [R] smoothed contour lines

2009-01-07 Thread William Dunlap
Greg Snow Greg.Snow at imail.org Wed Jan 7 17:58:07 CET 2009 Here is one possible approach to get you started (this is not a final answer): x - seq(-3,3) y - seq(-3,3) z - outer(x,y, function(x,y,...) x^2 + y^2 ) tmp - contourLines(x,y,z) contour(x,y,z, lty=0) lapply(tmp,

Re: [R] generating data

2009-01-07 Thread Sarah Goslee
This sounds rather like homework. If so, then talk to your instructor for help. Otherwise: First you go to R Site Search at http://finzi.psych.upenn.edu/search.html or to google. Then you search for normal distribution. Then you search for plot. Then you search for cluster. If you have

[R] troubles performing Moran.I test

2009-01-07 Thread Barbara . Spillmann
dear R users, I have troubles performing Moran.I test as suggested on http://www.ats.ucla.edu/stat/r/faq/morans_i.htm my spatial data are longitude and lattitide of communities. The calculation of the inverse distance matrix according to the homepage (using my data) datAL -

Re: [R] proto question

2009-01-07 Thread Gabor Grothendieck
On Wed, Jan 7, 2009 at 10:22 AM, Simon Knapp s.kn...@mmassociates.com.au wrote: Dear R Users, I have a couple of proto objects like: wedge - proto(expr={ start.year - 2008 end.year - 2050 }) star.rating - wedge$proto( star = c(4, 5, 8, 10), gain = c(0, .3, .5,

Re: [R] rbind for matrices - rep argument

2009-01-07 Thread Gabor Grothendieck
For matrices you can use kronecker: kronecker(rep(1, 6), data.matrix(Xdf)) [,1] [,2] [,3] [,4] [1,] 1.1 2.1 3.1 4.1 [2,] 1.2 2.2 3.2 4.2 [3,] 1.1 2.1 3.1 4.1 [4,] 1.2 2.2 3.2 4.2 [5,] 1.1 2.1 3.1 4.1 [6,] 1.2 2.2 3.2 4.2 [7,] 1.1 2.1 3.1 4.1 [8,] 1.2

Re: [R] Understanding dsyrk_ in C code

2009-01-07 Thread Douglas Bates
On Tue, Jan 6, 2009 at 8:54 PM, Nathan S. Watson-Haigh nathan.watson-ha...@csiro.au wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm trying to understand some C code in an R package I'm using. I'm address this question here as it's matrix algebra...and I'm no pro at that! the C

Re: [R] smoothed contour lines

2009-01-07 Thread Deepayan Sarkar
On Tue, Jan 6, 2009 at 8:52 AM, Andrea Storto andrea.sto...@met.no wrote: Hi all, I'm trying to draw a contour plot with rounded (smoothed) contour lines instead of sharp angles; when the grid consists of only a few points in x- and y- axis, the resulting contour is in facts rather ugly

Re: [R] Another newbie question

2009-01-07 Thread Peter Alspach
Kia ora Allen I'm not sure what you have tried or what your level of understanding is. However, if your dataframe is: allen sp1 sp2 sp3 1 0 0 1 2 1 0 1 3 1 1 1 4 0 0 0 str(allen) 'data.frame': 4 obs. of 3 variables: $ sp1: int 0 1 1 0 $ sp2: int 0 0 1 0 $ sp3:

[R] inter-timeseries correlation or corrections

2009-01-07 Thread Tim Michelsen
Hello, I am currently working in the field of climate and environmental data analysis which is a lot founded on the analysis, preparation and combination of time series. About a bit more than one year ago I started to use python and the marvellous timeseries module [1]. Which offers a very

[R] xtable-longtable question

2009-01-07 Thread Felipe Carrillo
Hello: I am using Sweave to generate a PDF with figures and tables and was wondering if is possible to carry on table headers and some kind of caption like 'Continued' to the next PDF page when creating long tables. Felipe D. Carrillo Supervisory Fishery Biologist Department of the

Re: [R] Another newbie question

2009-01-07 Thread jim holtman
You did not provide any data, so I will take a guess at what it looks like: x - matrix(sample(0:1, 100, TRUE), 10) colnames(x) - LETTERS[1:10] x - as.data.frame(x) x A B C D E F G H I J 1 0 1 0 0 0 1 1 0 0 0 2 0 0 0 0 1 1 0 0 1 0 3 1 1 0 0 1 0 0 0 1 1 4 0 1 1 1 0 1 1 0 0 0 5 0 1 1 0 0

Re: [R] how to estimate overdispersion in glmer models?

2009-01-07 Thread Ben Bolker
lcayuela at ugr.es writes: [snip] model1 - glmer(fruitset ~ Dist*wire + (1|Site), data, binomial) summary(model1) Generalized linear mixed model fit by the Laplace approximation Formula: fruitset ~ Dist * wire + (1 | Site) Data: data AIC BIC logLik deviance 68.23 70.65 -29.11

Re: [R] inter-timeseries correlation or corrections

2009-01-07 Thread stephen sefick
look at zoo and ts, and it all depends on what you want to do. On Wed, Jan 7, 2009 at 2:27 PM, Tim Michelsen timmichel...@gmx-topmail.de wrote: Hello, I am currently working in the field of climate and environmental data analysis which is a lot founded on the analysis, preparation and

Re: [R] Another newbie question

2009-01-07 Thread Dimitris Rizopoulos
try the following: dat - data.frame( sp1 = rbinom(10, 1, 0.5), sp2 = rbinom(10, 1, 0.5), sp3 = rbinom(10, 1, 0.5), sp4 = rbinom(10, 1, 0.5), sp5 = rbinom(10, 1, 0.5), sp6 = rbinom(10, 1, 0.5) ) ind - sapply(dat, as.logical) dat$Sp - apply(ind, 1, function (x, nams)

Re: [R] R in the NY Times

2009-01-07 Thread Tony Breyal
Google Alerts are great, but unfortuantly the brevity of R's name is the main problem i think. though, thinking about it, i suppose if one could work out the 'best' key words to use, it might be possible to not get too many miss- classified results, e.g.,

Re: [R] R in the NY Times

2009-01-07 Thread Wacek Kusnierczyk
Kevin E. Thorpe wrote: Zaslavsky, Alan M. wrote: SAS says it has noticed R’s rising popularity at universities, despite educational discounts on its own software, but it dismisses the technology as being of interest to a limited set of people working on very hard tasks. “I think it

  1   2   >