[R] Convert a lis to matrix

2009-06-07 Thread Manisha Brahmachary
Hello, This is an urgent request. I want to convert a list of 3 elements into a matrix and I am not sure how to do it. The list looks like this: List of 3 $ : num [1:15364, 1] 0.133 0.622 0.588 1.024 0.583 ... ..- attr(*, dimnames)=List of 2 .. ..$ : chr [1:15364] 6420681 3610072

Re: [R] Journal Articles that Have Used R

2009-06-07 Thread Jonathan Baron
I also use R to redraw figures for the journal I edit (below), when the authors cannot produce usable graphics (about 50% of the author who try). Unfortunately, I cannot find a way to search for just the R files. They are all http://journal.sjdm.org/*/*.R where * is the number of the article.

[R] stars (as fourfold plots) in plot (symbols don't work)

2009-06-07 Thread maiya
Hi! I have a dataset with three columns -the first two refer to x and y coordinates, the last one are odds ratios. I'd like to plot the data with x and y coordinates and the odds ratio shown as a fourfold plot, which I prefer to do using the stars function. Unfortunately the stars option in

[R] extract rows having negative values

2009-06-07 Thread Manisha Brahmachary
Hello, I have a matrix with 6 columns and 12 rows. I want to extract out those IDs (rownames) from my matrix which have a negative values. For each ID(row) if the negative value is even under 1 column it needs to be extracted out. I will be grateful for any correct suggestion. Thanks

Re: [R] extract rows having negative values

2009-06-07 Thread Bill.Venables
rownames(X)[apply(X, 1, function(r) any(r 0))] ... if I understand you correctly. From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Manisha Brahmachary [mb3...@c2b2.columbia.edu] Sent: 07 June 2009 08:54 To:

Re: [R] EBImage not loading

2009-06-07 Thread Gregoire Pau
Hi Quin, This is a well documented bug of Ubuntu 8.10 (Hardy Heron), preventing applications using libgomp (EBImage via ImageMagick) to work: https://bugs.launchpad.net/ubuntu/hardy/+source/gcc-4.2/+bug/235070 The bug was fixed in the package gcc-4.2.4-3ubuntu3. Please note that your R

Re: [R] Convert a lis to matrix

2009-06-07 Thread Bernardo Rangel Tura
On Sun, 2009-06-07 at 00:14 -0400, Manisha Brahmachary wrote: Hello, This is an urgent request. I want to convert a list of 3 elements into a matrix and I am not sure how to do it. The list looks like this: List of 3 $ : num [1:15364, 1] 0.133 0.622 0.588 1.024 0.583 ...

[R] Inf in nnet final value for validation data

2009-06-07 Thread Andrea Weidacher
Hi, I use nnet for my classification problem and have a problem concerning the calculation of the final value for my validation data.(nnet only calculates the final value for the training data). I made my own final value formula (for the training data I get the same value as nnet): #

Re: [R] Journal Articles that Have Used R

2009-06-07 Thread Gabor Grothendieck
Try this: site:journal.sjdm.org filetype:R On Sat, Jun 6, 2009 at 6:39 PM, Jonathan Baronba...@psych.upenn.edu wrote: I also use R to redraw figures for the journal I edit (below), when the authors cannot produce usable graphics (about 50% of the author who try). Unfortunately, I cannot

[R] writing a panel function in coplot for displaying a non-linear regression model graphically

2009-06-07 Thread Marion Dumas
Hello,I am a little bit struggling with the following: I would like to draw a coplot and in each panel draw the curve and display the coefficients of the regression model y~a*x^b. I thought of running nls(y~a*x^b,...) in panel=function(x,y...){} when calling coplot. How can I do this?

[R] One rather theoretical question about fitting algorithm

2009-06-07 Thread useR
Hi, What I'm trying to achieve is very fast algorithm for fitting logistic regression model. I have to estimate regression coeficients using about 10k observations. Once I have coefficients estimated, new 100 rows of data becomes available Now I need to reestimate coeficients using 100 newly

Re: [R] Journal Articles that Have Used R

2009-06-07 Thread Ted Harding
On 07-Jun-09 10:56:25, Gabor Grothendieck wrote: Try this: site:journal.sjdm.org filetype:R When I enter that into Google, I got only the following two hits: # #!/usr/bin/Rscript --vanilla # input is a pre-made list of files ... #!/usr/bin/Rscript --vanilla # input is a pre-made list of

Re: [R] Journal Articles that Have Used R

2009-06-07 Thread Gabor Grothendieck
The fact that the search did find two files suggests that it works but the problem may be that google has just not indexed those other files. Try entering the url for one of them into google and google still does not find it. http://journal.sjdm.org/8210/test.R On Sun, Jun 7, 2009 at 7:37 AM,

Re: [R] Journal Articles that Have Used R

2009-06-07 Thread Jonathan Baron
Argh. The reason we can't find my example R files with Google is that they were not indexed because there were no links to them. I've now created a page with just these links, and a link to that page at the very bottom of http://journal.sjdm.org/submit.htm Google should find it all eventually.

Re: [R] EBImage not loading

2009-06-07 Thread Quin Wills
Hi Greg It works! Thanks. I've noticed a lot of general Heron-unhappiness re. ImageMagick. 'Appreciate that ImageMagick isn't really your domain, but it might be helpful to put up a solution page somewhere. postcript 1 - my apologies. I sent this off to the wrong list... I really should have

Re: [R] One rather theoretical question about fitting algorithm

2009-06-07 Thread Bill.Venables
The glm function allows you to specify starting values for beta (start =), eta (etastart =) or mu (mustart =). In your case the starting value for beta would seem to be the most appropriate. You might find providing a starting value for mu or eta also works well, provided you can come up with

[R] Scrolling behavior in View()

2009-06-07 Thread Jose Quesada
Hi, I've realized that the scrolling behavior in View() is unlike most other applications. It seems that the minimum scroll size is very large for large objects( i.e., a vector of 1M integers), and it might be that this scroll is proportional to the size of the object. Try this: a = 1:100

Re: [R] Journal Articles that Have Used R

2009-06-07 Thread Ted Harding
I think the reason Google will not find it is that, in the Journal website, the R files (and the names of the article directories that might contain them, such as journal.sjdm.org/8210/ -- see below) are not directly pointed to by any index.html or any href ... /href in the website, as far as I

Re: [R] RPostgreSQL segfault with LEFT JOIN

2009-06-07 Thread Dirk Eddelbuettel
On 7 June 2009 at 06:40, Neil Tiffin wrote: | I am adding your note to google code issues (http://code.google.com/p/rpostgresql/issues/list | ), issue Number 1. Normally I monitor R-SIG-DB (https://stat.ethz.ch/mailman/listinfo/r-sig-db | ). That list seems most appropriate. | Hope to

Re: [R] Scrolling behavior in View()

2009-06-07 Thread Duncan Murdoch
On 07/06/2009 9:50 AM, Jose Quesada wrote: Hi, I've realized that the scrolling behavior in View() is unlike most other applications. It seems that the minimum scroll size is very large for large objects( i.e., a vector of 1M integers), and it might be that this scroll is proportional to the

Re: [R] Journal Articles that Have Used R

2009-06-07 Thread Ted Harding
On 07-Jun-09 14:01:14, Ted Harding wrote: I think the reason Google will not find it is that, in the Journal website, the R files (and the names of the article directories that might contain them, such as journal.sjdm.org/8210/ -- see below) are not directly pointed to by any index.html or any

[R] Need some help in R : value more than equals to a row.

2009-06-07 Thread suparna mitra
Hallo, I was trying some code, but couldn't make one step of the code properly. Can anybody please help me? I have one matrix like this values [,1] [,2] [,3] [,4] [,5] [1,] 0.778 0.3611 0. 0.139 0.000 [2,] 1.000 0. 0.53846154

[R] Need some help in R : value more than equals to a row.

2009-06-07 Thread suparna mitra
Hallo, I was trying some code, but couldn't make one step of the code properly. Can anybody please help me? I have one matrix like this values [,1] [,2] [,3] [,4] [,5] [1,] 0.778 0.3611 0. 0.139 0.000 [2,] 1.000 0. 0.53846154

Re: [R] Need some help in R : value more than equals to a row.

2009-06-07 Thread Jakson Alves de Aquino
suparna mitra wrote: Hallo, I was trying some code, but couldn't make one step of the code properly. Can anybody please help me? I have one matrix like this values [,1] [,2] [,3] [,4] [,5] [1,] 0.778 0.3611 0. 0.139 0.000 [2,]

Re: [R] Need some help in R : value more than equals to a row.

2009-06-07 Thread Gabor Grothendieck
Try this: t(apply(m, 1, function(x) colMeans(outer(x, x, = On Sun, Jun 7, 2009 at 10:09 AM, suparna mitrami...@informatik.uni-tuebingen.de wrote: Hallo,  I was trying some code, but couldn't make one step of the code properly. Can anybody  please  help me? I have one matrix like this

[R] How do I construct a one matrix from another? (newbie)

2009-06-07 Thread jonathanbriggs
Apologies if this is an obvious question but I am teaching myself R and the occasional push in the right direction is much appreciated? I have a data.frame containing data that looks like this CustID itemID 1a 1b 2c 3a 3c I want to assemble the vector of

Re: [R] How do I construct a one matrix from another? (newbie)

2009-06-07 Thread Dylan Beaudette
Hi, some ideas: ?split ?by library(plyr) ?ddply Cheers, Dylan On Sun, Jun 7, 2009 at 10:26 AM, jonathanbriggsjonathanbri...@mac.com wrote: Apologies if this is an obvious question but I am teaching myself R and the occasional push in the right direction is much appreciated? I have a

Re: [R] How do I construct a one matrix from another? (newbie)

2009-06-07 Thread Jorge Ivan Velez
Dear jonathanbriggs, Try x - read.table(textConnection(CustID itemID 1a 1b 2c 3a 3c),header=TRUE) closeAllConnections() with(x, tapply(CustID, itemID, paste, collapse=,) ) # abc # 1,3 1 2,3 with(x, tapply(itemID, CustID, paste, collapse=,) ) #

[R] graphically representing frequency of words in a speech?

2009-06-07 Thread Brown, Tony Nicholas
Dear all, I recently saw a graph on television that displayed selected words/phrases in a speech scaled in size according to their frequency. So words/phrases that were often used appeared large and words that were rarely used appeared small. The closest thing I can find on the web to

Re: [R] graphically representing frequency of words in a speech?

2009-06-07 Thread Marc Schwartz
On Jun 7, 2009, at 1:41 PM, Brown, Tony Nicholas wrote: Dear all, I recently saw a graph on television that displayed selected words/phrases in a speech scaled in size according to their frequency. So words/phrases that were often used appeared large and words that were rarely used

Re: [R] graphically representing frequency of words in a speech?

2009-06-07 Thread Gorjanc Gregor
The only thing that I found for R is by Gregor Gorjanc, but the information seems to be dated: http://www.bfro.uni-lj.si/MR/ggorjan/software/R/index.html#tagCloud Hi, Yes, I have tried to create a tag cloud plot in R, but I abandoned the project due to other things. The main obstacle was

Re: [R] graphically representing frequency of words in a speech?

2009-06-07 Thread Brown, Tony Nicholas
Thank you so much Mark and Gregor. The basic information, suggestions, and R code that you provided is most helpful. Tony -Original Message- From: Gorjanc Gregor [mailto:gregor.gorj...@bfro.uni-lj.si] Sent: Sunday, June 07, 2009 2:17 PM To: Marc Schwartz; Brown, Tony Nicholas Cc: rhelp

[R] latex subscripts in title of a plot

2009-06-07 Thread Dajiang Jeff Liu
Dear All, I want to ask how to make latex symbol \beta_1 into the title of the page. The usual bquote does not seem to work. Any ideas? Thanks a lot. Regards, Dajiang [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Must be a better way to collate sequenced data

2009-06-07 Thread Burke, Robin
I have data that looks like this time_stamp (seconds) user_id The data is (partial) ordered by time - in that sometimes transactions occur at the same timestamp. The output I want is collated by transaction time on a per user basis, normalized by the maximum number of transactions per user,

Re: [R] graphically representing frequency of words in a speech?

2009-06-07 Thread Mike Lawrence
Below are various attempts using using ggplot2 (http://had.co.nz/ggplot2/). First I try random positioning, then random positioning with alpha, then a quasi-random position scheme in polar coordinates: #this demo has random number generation # so best to set a seed to make it # reproducible.

[R] Reminder: useR Group SFBA - R Graphics Survey - Nicholas Lewin-Koh

2009-06-07 Thread Jim Porzak
All San Francisco Bay Area useRs: This Wednesday evening Nicholas is presenting a survey of statistical visualization best practices corresponding methods in R. For details see http://www.meetup.com/R-Users/calendar/9763376/ Note this is our last meeting before the summer break. Hope to see

Re: [R] Scrolling behavior in View()

2009-06-07 Thread Duncan Murdoch
On 07/06/2009 9:50 AM, Jose Quesada wrote: Hi, I've realized that the scrolling behavior in View() is unlike most other applications. It seems that the minimum scroll size is very large for large objects( i.e., a vector of 1M integers), and it might be that this scroll is proportional to the

Re: [R] Excel Export in a beauty way

2009-06-07 Thread Tom Short
Another useful way to create a formatted Excel file is to write out an HTML file, but put an XLS extension on it. When Excel reads it, it will convert it. Users will treat it like an Excel file. This trick allows you to add formatted titles, table footnotes, links to other files (pdf graphs for

[R] Random Forest % Variation vs Psuedo-R^2?

2009-06-07 Thread Ryan Harrigan
Hi all (and Andy!), When running a randomForest run in R, I get the last part of an output (with do.trace=T) that looks like this: 1993 | 0.04606 130.43 | 1994 | 0.04605 130.40 | 1995 | 0.04605 130.43 | 1996 | 0.04605 130.43 | 1997 | 0.04606 130.44 | 1998 | 0.04607 130.47 |

Re: [R] latex subscripts in title of a plot

2009-06-07 Thread Kingsford Jones
Hi Dajiang, try plot(1, main=expression(beta[1])) and, more generally, see ?plotmath or demo(plotmath) Kingsford Jones On Sun, Jun 7, 2009 at 4:43 PM, Dajiang Jeff Liudajiang@gmail.com wrote: Dear All, I want to ask how to make latex symbol \beta_1 into the title of the page. The

[R] Plotting two regression lines on one graph

2009-06-07 Thread Jo Stringer
Hi! I have fitted two glms assuming a poisson distribution which are: fit1 - glm(Aids ~ Year, data=aids, family=poisson()) fit2 - glm(Aids ~ Year+I(Year^2), data=aids, family=poisson()) I am trying to work out how to represent the fitted regression curves of fit1 and fit2 on the one graph.

Re: [R] Plotting two regression lines on one graph

2009-06-07 Thread Dylan Beaudette
One approach to this is generating a representative sequence of your x-variable(s) with seq() or expand.grid(). Next use the predict() function to make predictions from your glm object along the sequence. Finally, plot the predictions vs. the new sequence. Putting everything into a dataframe

Re: [R] Plotting two regression lines on one graph

2009-06-07 Thread milton ruser
Hi Jo, Next time try prepare a reproducible code. You have several ways of do that (see Dylan Beaudette) and give a look below. x-1:100 y-7+x*(sqrt(x*runif(100))) plot(y~x) mod1-glm(y~x) mod2-glm(y~x+I(x*x)) curve(mod1$coef[1]+mod1$coef[2]*x, col=red, add=T, lwd=3)

Re: [R] Convert a lis to matrix

2009-06-07 Thread Manisha Brahmachary
Thank you, it worked. -Original Message- From: Bernardo Rangel Tura [mailto:t...@centroin.com.br] Sent: Sunday, June 07, 2009 6:14 AM To: Manisha Brahmachary Cc: r-help@r-project.org Subject: Re: [R] Convert a lis to matrix On Sun, 2009-06-07 at 00:14 -0400, Manisha Brahmachary wrote:

Re: [R] extract rows having negative values

2009-06-07 Thread Manisha Brahmachary
Thank you Bill, your suggestion works just fine!!! -Original Message- From: bill.venab...@csiro.au [mailto:bill.venab...@csiro.au] Sent: Sunday, June 07, 2009 3:23 AM To: Manisha Brahmachary; r-help@r-project.org Subject: RE: extract rows having negative values rownames(X)[apply(X, 1,

[R] ridiculous behaviour printing to eps: labels all messed up!

2009-06-07 Thread maiya
OK, this is really weird! here's an example code: t1-c(1,2,3,4) t2-c(4,2,4,2) plot(t1~t2, xlab=exp1, ylab=exp2) dev.copy2eps(file=test.eps) that all seems fine... until you look at the eps file created, where for some weird reason, if you scroll down to the end, the code reads: /Font1

[R] Interpreting R -results for Bivariate Normal

2009-06-07 Thread beetle2
HI Guys, I know that this forum is not for homework but I am trying to interpret R output code. I was just wondering if someone might be able to help. I have been given the following. For (X1,X2) distributed bivariate normal with parameters mu1 = 5.8 mu2 = 5.3 sd1 = sd2 = 0.2 and p = 0.6

Re: [R] Plotting two regression lines on one graph

2009-06-07 Thread David Winsemius
Since you have provided no executable data and not even a clear enough description of the data to offer advice regarding approaches or pitfalls, I will use the example in glm's help page: counts - c(18,17,15,20,10,20,25,13,12) outcome - gl(3,1,9) treatment - gl(3,3) glm.D93r - glm(counts ~