Re: [R] ggplot facet and subsetting

2014-11-27 Thread ONKELINX, Thierry
Dear Petr, You need to use aes_string() instead of aes(). The.cols - colnames(data)[n:m] for (i in The.cols) { p-ggplot(data, aes_string(x=x, y= i, colour=f))), ...} Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team

[R] R argparse: Line breaks in description

2014-11-27 Thread Dario Beraldi
Hello, I'm using the R package argparse to parse command line arguments. For readability, I'd like to add line breaks in the description of the script and in the help of the arguments. However, I can't do it... Let's see an example. Given this script: #!/usr/bin/env Rscript

Re: [R] Using Rmpfr to round with precision in R

2014-11-27 Thread Martin Maechler
Artur Augusto arturaugu...@gmail.com on Wed, 19 Nov 2014 15:26:12 -0200 writes: I'm trying to use the Rmpfr library with the round() function to apply the round half to even rule and achieve correct results, without errors due the finite precision of float point values.

Re: [R] ggplot facet and subsetting

2014-11-27 Thread PIKAL Petr
Thank you Thierry Still I wonder why without facet_grid code for (i in n:m) { p-ggplot(data, aes(x=x, y=data[,i], colour=f))), ...} works and with facet_grid does not. Best regards Petr -Original Message- From: ONKELINX, Thierry [mailto:thierry.onkel...@inbo.be] Sent: Thursday,

Re: [R] plot.hclust point to older version

2014-11-27 Thread PIKAL Petr
Hm -Original Message- From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] Sent: Wednesday, November 26, 2014 8:09 PM To: PIKAL Petr; Martin Maechler Cc: R help Subject: Re: [R] plot.hclust point to older version Short answer to your question is R files and original data from

Re: [R] ggplot facet and subsetting

2014-11-27 Thread PIKAL Petr
Thanks to John, Denis, Jeff and Thierry The key is to use aes_string instead of aes in cycle and preprocess objects to avoid creating factors on fly. For some reason, facet_grid does not accept [,], while without facet_grid such subsetting works without problem. I use such construction when I

[R] Cycling xerror values in cp of rpart...

2014-11-27 Thread Levent TERLEMEZ
Dear R Users, Is it possible to get cycling xerror scores in cp of rpart while getting the same tree on every run (or am I missing something or understood wrong)? I build it with an old version of R in a Windows VM installed on a Intel based macbook and reuse the same codes with a newer version

Re: [R] porting an access database to sqlite

2014-11-27 Thread ravi
Hi,Thanks for the replies. My problem is that the tables (at least, a few of them) are too large. I cannot directly export the tables to get text files. I tried the following : c1-sqlQuery(ch,SELECT COUNT(*) FROM table1) I got the following error (changed the text to alter table names) :[1]

Re: [R] Generate random numbers under constrain

2014-11-27 Thread Jue Lin-Ye
Hello! I am relatively new using R, but this is my contribution to the answer. How about using a Monte-Carlo method. Generate m numbers in the support [0,1], where mn. Then constrain by constructing a loop that takes every one of the elements in the m sized vector and select the ones that sum up

Re: [R] plot.hclust point to older version

2014-11-27 Thread Martin Maechler
PP == PIKAL Petr petr.pi...@precheza.cz on Thu, 27 Nov 2014 13:40:36 + writes: PP Hm -Original Message- From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] Sent: Wednesday, November 26, 2014 8:09 PM To: PIKAL Petr; Martin Maechler Cc: R help

Re: [R] Generate random numbers under constrain

2014-11-27 Thread Erich Neuwirth
You want random numbers within the n-dimensional simplex (sum xi =1) The easiest solution of course would be creating n-dimensions vectors with iid uniform components on [0,1) and throwing away those violating the inequality. Since the volume of the n-dimensional simplex is 1/n! (factorial) this

Re: [R] Using grid.layout inside grid.layout with grid package: naming of the viewports affects plotting

2014-11-27 Thread Paul Murrell
Hi The essence of your problem is that seekViewport() is much more ambiguous than downViewport(). Your set up involves creating a hierarchy of viewports four deep, with eight viewport paths (vpPaths) in total ... vp1::A::vp2::plot1 ::plot2 ::B::vp3::plot1 ::plot2

Re: [R] Generate random numbers under constrain

2014-11-27 Thread Mikhail Umorin
How about generating the uniform numbers sequentially and keep the running sum of all the previous numbers. At each step check if the newly generated random number plus the running sum 1 discard the number and generate a new one, repeat the condition check. If the new number plus old sum 1

[R] How to handle NA in fda (functional data analysis) package?

2014-11-27 Thread Poonam Rathi
My Question is: How to handle NA in fda (functional data analysis) package? Poonam Rathi Doctoral Student - Production and Quantitative Methods Indian Institute of Management - Ahmedabad Dorm 6,Room 15 | +917966326615 | +919974183701 [[alternative HTML version deleted]]

[R] Data mtcars

2014-11-27 Thread BRC
I remembered that I had seen instruction to store mtcars build data in r, but right now I missed it, Please advise how I can see it or what will be procedure to define data frame with row and column names. I need to develop dendrogram of my own dataset contains 15 variables and more than 100

Re: [R] Data mtcars

2014-11-27 Thread Boris Steipe
A simple Google search with mtcars dendrogram will find many explicit examples for you. B. On Nov 27, 2014, at 2:54 PM, BRC brc@gmail.com wrote: I remembered that I had seen instruction to store mtcars build data in r, but right now I missed it, Please advise how I can see it or what

Re: [R] porting an access database to sqlite

2014-11-27 Thread Jeff Newmiller
This is not really on topic here. At best the R-sig-db mailing list would be on topic, but it seems you may be dealing with issues related to nonstandard sql so you might need to find some additional help in a more Access-specific forum. One thing you might try is using a specific column name

Re: [R] Using grid.layout inside grid.layout with grid package: naming of the viewports affects plotting

2014-11-27 Thread Helske Satu
Hi Paul, Thank you for your illustrative explanation and help with rewriting the code. It works now and, more importantly, I understand what is happening and why. Best regards, Satu -Original Message- From: Paul Murrell [mailto:p...@stat.auckland.ac.nz] Sent: 27. marraskuuta 2014