Re: [R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS

2009-08-28 Thread Maithili Shiva
Dear Sir,   Thanks a lot for your solution and guidance. It worked wonderfully.   Regards   Maithili --- On Thu, 27/8/09, Gabor Grothendieck ggrothendi...@gmail.com wrote: From: Gabor Grothendieck ggrothendi...@gmail.com Subject: Re: [R] Fw: PROBLEM - - COMPARING AND COMBINING two DATASETS

Re: [R] Best R text editors?

2009-08-28 Thread Liviu Andronic
On 8/27/09, Jonathan Greenberg greenb...@ucdavis.edu wrote: Quick informal poll: what is everyone's favorite text editor for working with R? I'd like to hear from people who are using editors that have some level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks! JGR

Re: [R] Best R text editors?

2009-08-28 Thread Stefan Grosse
On Thu, 27 Aug 2009 12:43:41 -0700 Jonathan Greenberg greenb...@ucdavis.edu wrote: JG Quick informal poll: what is everyone's favorite text editor for JG working with R? I'd like to hear from people who are using editors JG that have some level of direct R interface (e.g. Tinn-R, JG

Re: [R] Best R text editors?

2009-08-28 Thread Liviu Andronic
On 8/28/09, Stefan Grosse singularit...@gmx.net wrote: (JGR useless here since it consumes 100% CPU at least with Fedora Linux) The quick fix is to access Help About after the splash screen disappears at start-up. This works on Debian and Ubuntu. Liviu

Re: [R] Best R text editors?

2009-08-28 Thread Corrado
Eclipse + StatET (the R plugin) both on Linux and Windows On Thursday 27 August 2009 20:43:41 Jonathan Greenberg wrote: Quick informal poll: what is everyone's favorite text editor for working with R? I'd like to hear from people who are using editors that have some level of direct R

Re: [R] problem plotting with ggplot2

2009-08-28 Thread baptiste auguie
Hi, Have you checked that you have the latest version of ggplot2 and plyr? Please post your sessionInfo() HTH, baptiste 2009/8/28 romunov romu...@gmail.com Dear R-Help subsribers, upon running into a wonderful ggplot2 package by accident, I abruptly encountered another problem. Almost

[R] Has any one tested R 2.9.2 on Snow Leopard?

2009-08-28 Thread Jorgy Porgee
Hi all, not sure if this is the right place to ask this but R not being such a mainstream app, can't find the answer anywhere. I plan to upgrade to Snow asap and just wondering if anyone else has already and has successfully used R on Mac OSX 10.6. If so, what version? and is it running in 64 bit

[R] Panel Data Analysis (PLM) - Fixed Effects - cannot allocate vector of length

2009-08-28 Thread Millo Giovanni
Hello Peter. Sorry, I was on vacation. I hope my answer is still of some use to you. Strictly speaking, this is not a 'plm' problem. As you guessed, you're hitting memory limits in R. See ??memory and more specifically ?Memory ?Memory-limits to see whether you can increase them. Re 'plm'

Re: [R] Best R text editors?

2009-08-28 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi! Corrado wrote: Eclipse + StatET (the R plugin) both on Linux and Windows Please, does it work with Eclipse 3.5 Galileo on a Mac OS X (10.5.8) box? Thanks! -- Ricardo Rodríguez Your XEN ICT Team __ R-help@r-project.org mailing list

Re: [R] Has any one tested R 2.9.2 on Snow Leopard?

2009-08-28 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi! Jorgy Porgee wrote: Hi all, not sure if this is the right place to ask this but R not being such a mainstream app, can't find the answer anywhere. I plan to upgrade to Snow asap and just wondering if anyone else has already and has successfully used R on Mac OSX 10.6. If so, what version?

Re: [R] Labeling and calculating distance from points

2009-08-28 Thread KABELI MEFANE
Hi all   Can you help me label the points Si' s accordingly with subscripts, also to write a distance on between location S0   (0.5,0.5 ) and all order points Si  lines if i have this kind of code:   library(geoR) coords-matrix(c(0,0,1,1,0,1,0,1), nrow=4, ncol=2) data-c(3,5,6,4)

Re: [R] Best R text editors?

2009-08-28 Thread Corrado
I am using 3.4.2 not 3.5, I would not know. But it is worth visiting the STATET mailing list archive and subscribe to the mailing list. On Friday 28 August 2009 09:22:14 [Ricardo Rodriguez] Your XEN ICT Team wrote: Hi! Corrado wrote: Eclipse + StatET (the R plugin) both on Linux and

Re: [R] Best R text editors?

2009-08-28 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks, Corrado. Corrado wrote: I am using 3.4.2 not 3.5, I would not know. But it is worth visiting the STATET mailing list archive and subscribe to the mailing list. FYI, here the available public testing version for Eclipse 3.5

[R] Using Test functions in Wavelet

2009-08-28 Thread assaedi76 assaedi76
Hi  R users   I thankfull all R users for helping each other.   Could some one help me to  define data set for the following test functions: Step, Wave, Blip, Angles, Parabolas for  example , doppler function I can write dopp(n) to get data set of size n What about the functions mentioned above?

[R] regexp help needed.

2009-08-28 Thread Carlos Gonzalo Merino Mendez
Hi, I posted yesterday with a problem in a script. I still have the same problem, but I think I found a better way to explain my problem. I have a vector of character strings. Each string is unique, including numbers and letters. In the real world they represent a list of codes, so each

[R] breaking multi-modal histograms down into combinations of unimodal distributions

2009-08-28 Thread Thomas Groen
Dear All, Does anybody know if there is a functionality in R to break histograms that show a clear bi-modal (or multi-modal) distribution into a series of unimodal histograms that added up result in the original histogram? I was thinking of using QQ-plots (for which tools are available in R), and

[R] Regarding NaN output in sets package

2009-08-28 Thread MSP Stat
Hi! I have built a program for fuzzy inference using the sets package. Though there are no errors after defuzzifying using gset_defuzzify() command, the output after using the centroid option is a NaN. What may be going wrong here? P.S: There are just 10 dependent factors and just five rules. All

Re: [R] Best R text editors?

2009-08-28 Thread Bjørn Arild Mæland
I'm using Emacs+ESS on Linux and OS X. Of course, since I use Emacs for pretty much everything it was an easy choice. :) -Bjorn 2009/8/27 Jonathan Greenberg greenb...@ucdavis.edu: Quick informal poll: what is everyone's favorite text editor for working with R?  I'd like to hear from people who

Re: [R] Best R text editors?

2009-08-28 Thread Romain Francois
On 08/27/2009 09:43 PM, Jonathan Greenberg wrote: Quick informal poll: what is everyone's favorite text editor for working with R? I'd like to hear from people who are using editors that have some level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks! --j This wiki page is set

[R] delete duplicated conditional

2009-08-28 Thread Christian Schulz
Hi, have anybody a hint, how i could keep the duplicated with a condition in a second column, i.e. maximum in column 620. nodups - apos[!duplicated(apos[,1]),c(1,620)] many thanks Christian __ R-help@r-project.org mailing list

Re: [R] Plotting to stdout

2009-08-28 Thread Oliver Bandel
Philipp Pagel p.pagel at wzw.tum.de writes: On Wed, Aug 26, 2009 at 07:53:57PM +, Oliver Bandel wrote: is there a way to write the result of a plot to stdout? I mean even a binary thingy like a png-file, written to stdout?! I tried with the file-argument of png() and jpeg(),

Re: [R] breaking multi-modal histograms down into combinations o

2009-08-28 Thread Ted Harding
On 28-Aug-09 10:34:46, Thomas Groen wrote: Dear All, Does anybody know if there is a functionality in R to break histograms that show a clear bi-modal (or multi-modal) distribution into a series of unimodal histograms that added up result in the original histogram? I was thinking of using

Re: [R] Plotting to stdout

2009-08-28 Thread Gábor Csárdi
On Fri, Aug 28, 2009 at 1:06 PM, Oliver Bandeloli...@first.in-berlin.de wrote: [...] The goal was to produce a picture in a web-environment. At the moment rpy2 will be used maybe there are way to achieve something like that in this way, but I'm also new to rpy2. When the graphic could be

Re: [R] Plotting to stdout

2009-08-28 Thread Romain Francois
On 08/28/2009 01:16 PM, Gábor Csárdi wrote: On Fri, Aug 28, 2009 at 1:06 PM, Oliver Bandeloli...@first.in-berlin.de wrote: [...] The goal was to produce a picture in a web-environment. At the moment rpy2 will be used maybe there are way to achieve something like that in this way, but

Re: [R] Plotting to stdout

2009-08-28 Thread Gabor Grothendieck
On Fri, Aug 28, 2009 at 7:16 AM, Gábor Csárdicsa...@rmki.kfki.hu wrote: On Fri, Aug 28, 2009 at 1:06 PM, Oliver Bandeloli...@first.in-berlin.de wrote: [...] The goal was to produce a picture in a web-environment. At the moment rpy2 will be used maybe there are way to achieve something

Re: [R] delete duplicated conditional

2009-08-28 Thread Christian Schulz
i get it. aposSorted - apos[order(apos[,620],decreasing=TRUE),] nodups - aposSorted[!duplicated(aposSorted[,1]),c(1,620)] Hi, have anybody a hint, how i could keep the duplicated with a condition in a second column, i.e. maximum in column 620. nodups - apos[!duplicated(apos[,1]),c(1,620)]

Re: [R] regexp help needed.

2009-08-28 Thread Henrique Dallazuanna
See this example: Str - c(345asd, 31qwe, 234tyu, 40kjhg) grep(^3, Str, value = TRUE) split(Str, substr(Str, 1, 1)) On Fri, Aug 28, 2009 at 7:29 AM, Carlos Gonzalo Merino Mendez carlosgmer...@yahoo.com wrote: Hi, I posted yesterday with a problem in a script. I still have the same problem,

Re: [R] Plotting to stdout

2009-08-28 Thread Gábor Csárdi
On Fri, Aug 28, 2009 at 1:33 PM, Gabor Grothendieckggrothendi...@gmail.com wrote: [...] I could have used this functionality in a previous project as well; however, for Oliver's application just pass the filename to the python program use that in the img src=... tag (or have the python program

Re: [R] Plotting to stdout

2009-08-28 Thread Romain Francois
On 08/28/2009 01:47 PM, Gábor Csárdi wrote: On Fri, Aug 28, 2009 at 1:33 PM, Gabor Grothendieckggrothendi...@gmail.com wrote: [...] I could have used this functionality in a previous project as well; however, for Oliver's application just pass the filename to the python program use that in

[R] How to generate mean anova value row in anova table, instead of individual value for each predictor

2009-08-28 Thread Moumita Das
Hi All , Can anybody tell me if there's any way to get the summarized anova values.Now i will explain what i mean , when i say *summarized*. Below you can see the anova table of recmeanC1 with rest* all* i.e from recmeanC2 to i15(predictors),as shown in table. Df Sum Squares

[R] Help with glmer {lme4} function: how to return F or t statistics instead of z statistics?

2009-08-28 Thread Raldo Kruger
Hi, I'm new to R and GLMMs, and I've been unable to find the answers to my questions by trawling through the R help archives. I'm hoping someone here can help me. I'm running an analysis on Seedling survival (count data=Poisson distribution) on restoration sites, and my main interest is in

Re: [R] setting par(srt) according to plot aspect ratio

2009-08-28 Thread Levi Waldron
On Fri, Aug 28, 2009 at 1:48 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: Note that the aspect ratio changes when you resize the plot but the angle of the plotted text will not. So the only safe route is to set 'asp' and use that setting to select the angle. That is true with screen

Re: [R] Best R text editors?

2009-08-28 Thread John Kane
I've only really used Tinn-R but so far I am very happy with it. --- On Thu, 8/27/09, Jonathan Greenberg greenb...@ucdavis.edu wrote: From: Jonathan Greenberg greenb...@ucdavis.edu Subject: [R] Best R text editors? To: r-help r-help@r-project.org Received: Thursday, August 27, 2009, 3:43

Re: [R] Best R text editors?

2009-08-28 Thread Esmail
Jonathan Greenberg wrote: Quick informal poll: what is everyone's favorite text editor for working with R? Emacs+ESS __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Google's R Style Guide

2009-08-28 Thread Esmail
Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? Thanks, Esmail ps: Reminds me of PEP 8 for Python http://www.python.org/dev/peps/pep-0008/ Maybe not that surprising since Python is also one of

Re: [R] regexp help needed.

2009-08-28 Thread Carlos Gonzalo Merino Mendez
Thanks, this what I was looking for. From: Henrique Dallazuanna www...@gmail.com Cc: r-help@r-project.org Sent: Friday, August 28, 2009 1:42:25 PM Subject: Re: [R] regexp help needed. See this example: Str - c(345asd, 31qwe, 234tyu, 40kjhg) grep(^3, Str,

Re: [R] Best R text editors?

2009-08-28 Thread Petr PIKAL
Tinn-R Petr r-help-boun...@r-project.org napsal dne 28.08.2009 09:16:38: On Thu, 27 Aug 2009 12:43:41 -0700 Jonathan Greenberg greenb...@ucdavis.edu wrote: JG Quick informal poll: what is everyone's favorite text editor for JG working with R? I'd like to hear from people who are using

Re: [R] Google's R Style Guide

2009-08-28 Thread Peter Dalgaard
Esmail wrote: Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? The recommendation of variable.name over variable_name or variableName is contentious (to say the least) because of the clash with S3 method

Re: [R] Google's R Style Guide

2009-08-28 Thread Duncan Murdoch
On 8/28/2009 8:59 AM, Esmail wrote: Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? The rules are mostly reasonable, though they aren't the ones followed in the R source. One bad rule is the one on

Re: [R] Google's R Style Guide

2009-08-28 Thread Ted Harding
On 28-Aug-09 12:59:24, Esmail wrote: Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? Thanks, Esmail ps: Reminds me of PEP 8 for Python http://www.python.org/dev/peps/pep-0008/ Maybe not

[R] CHAID in R

2009-08-28 Thread Arup
Hi..I am trying to run CHAID in R..I have installed the sofyware Party and trying to use the function ctree() to carry out the analysis. but I am getting the following message Error in terms.default(formula, data = data) : no terms component . I am having some Likert scale variable where I have

[R] Help with glmer {lme4) function: how to return F or t statistics instead of z statistics.

2009-08-28 Thread Raldo Kruger
Hi, I'm new to R and GLMMs, and I've been unable to find the answers to my questions by trawling through the R help archives. I'm hoping someone here can help me. I'm running an analysis on Seedling survival (count data=Poisson distribution) on restoration sites, and my main interest is in

Re: [R] Google's R Style Guide

2009-08-28 Thread Duncan Murdoch
On 8/28/2009 9:22 AM, (Ted Harding) wrote: On 28-Aug-09 12:59:24, Esmail wrote: Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? Thanks, Esmail ps: Reminds me of PEP 8 for Python

[R] RPostgreSQL libpq problem

2009-08-28 Thread Bunny, lautloscrew.com
Dear all, I am stuck trying to get RPostgreSQL running on my Mac. PostgreSQL itself does work fine as it is able to connect with various other apps. Unfortunately the RPostgreSQL package is not available as a binary for MAC OS. Thus I´ve been trying to compile the source for quite some

Re: [R] problem plotting with ggplot2

2009-08-28 Thread romunov
As far as I know, the packages are up to date. I have had identical problems on 2.9.1 as well as on 2.8.1. I did a fresh install of 2.9.1 to no avail. Here is my sessionInfo(): sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale:

Re: [R] Plotting to stdout

2009-08-28 Thread Jeffrey Horner
Gábor Csárdi wrote: On Fri, Aug 28, 2009 at 1:33 PM, Gabor Grothendieckggrothendi...@gmail.com wrote: [...] I could have used this functionality in a previous project as well; however, for Oliver's application just pass the filename to the python program use that in the img src=... tag (or

Re: [R] Google's R Style Guide

2009-08-28 Thread Thomas . Adams
Esmail, Very nice; thanks! Tom - Original Message - From: Esmail esmail...@gmail.com Date: Friday, August 28, 2009 8:59 am Subject: [R] Google's R Style Guide Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r- style.html

[R] Question: how to index (subset) a data frame without memory overhead

2009-08-28 Thread Piotr Chmielowski
1. Suppose one has a big data frame (say, m such that dim(m)=c(8610, 3521) ) If only a subset of m, say m[1:8600, ] is now needed, how to select it without creating large memory overhead? A natural solution, m - m[1:8600,], seems to use in addition to memory needed to hold m roughly 2 times

Re: [R] Google's R Style Guide

2009-08-28 Thread Kevin Wright
On Fri, Aug 28, 2009 at 8:22 AM, Ted Harding ted.hard...@manchester.ac.ukwrote: On 28-Aug-09 12:59:24, Esmail wrote: Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? Thanks, Esmail ps:

Re: [R] Google's R Style Guide

2009-08-28 Thread hadley wickham
Perhaps most of you have already seen this?  http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? I made my own version that reflects my personal biases: http://had.co.nz/stat405/resources/r-style-guide.html Hadley -- http://had.co.nz/

Re: [R] problem plotting with ggplot2

2009-08-28 Thread Gabor Grothendieck
A few things to try. Try starting R using the --vanilla flag. From the Windows command line: rem change next line appropriately if needed cd \Program Files\R\R-2.9.1\bin Rgui --vanilla and see if it still happens.If that does not help try reinstalling R and all packages. On Fri, Aug 28,

Re: [R] How to generate mean anova value row in anova table, instead of individual value for each predictor

2009-08-28 Thread milton ruser
Hi Moumita, Could you send a minimum reproducible code as suggested on posting guide?! bests milton On Fri, Aug 28, 2009 at 8:08 AM, Moumita Das das.moumita.onl...@gmail.comwrote: Hi All , Can anybody tell me if there's any way to get the summarized anova values.Now i will explain what i

Re: [R] Google's R Style Guide

2009-08-28 Thread Duncan Murdoch
On 8/28/2009 10:41 AM, hadley wickham wrote: Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? I made my own version that reflects my personal biases: http://had.co.nz/stat405/resources/r-style-guide.html

Re: [R] problem plotting with ggplot2

2009-08-28 Thread romunov
Hello Gabor, your suggestion running R in vanilla mode was fruitful. I can plot at least bars. How would you proceed. How can I root out bad package or whatever is causing this? Cheers, Roman On Fri, Aug 28, 2009 at 4:48 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: A few things to

Re: [R] Google's R Style Guide

2009-08-28 Thread Barry Rowlingson
On Fri, Aug 28, 2009 at 3:53 PM, Duncan Murdochmurd...@stats.uwo.ca wrote: On 8/28/2009 10:41 AM, hadley wickham wrote: Perhaps most of you have already seen this?  http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? I made my own version that

[R] How to source a script with command line option?

2009-08-28 Thread Peng Yu
Hi, Suppose that I have the following script. $ cat commandArgs.R args=commandArgs(trailingOnly=TRUE) args[1] I can supply command line options $ Rscript commandArgs.R a args=commandArgs(trailingOnly=TRUE) args[1] [1] a I am wondering how to supply the command line arguments when I source

Re: [R] Google's R Style Guide

2009-08-28 Thread John Sorkin
I am troubled by the curly brace rule: An opening curly brace should never go on its own line and should always be followed by a new line; a closing curly brace should always go on its own line. It seems to me that the opening an dosing curly brace should go on their own lines to allow the

Re: [R] Google's R Style Guide

2009-08-28 Thread hadley wickham
I made my own version that reflects my personal biases: http://had.co.nz/stat405/resources/r-style-guide.html I see you repeated (or independently invented?) the bad rule about closing braces.  They should usually go on their own line, but not when followed by an else clause. That was an

[R] How to convert a string passed as an argument to a vector?

2009-08-28 Thread Peng Yu
Hi, $ cat commandArgs.R args=commandArgs(trailingOnly=TRUE) args[1]+10 I have the above code. But the following command line gives me an error. I am wondering what is the correct way to convert a string to a vector? $ Rscript commandArgs.R 1:3 args=commandArgs(trailingOnly=TRUE) args[1]+10

Re: [R] Google's R Style Guide

2009-08-28 Thread Kevin Wright
On Fri, Aug 28, 2009 at 9:41 AM, hadley wickham h.wick...@gmail.com wrote: Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? I made my own version that reflects my personal biases:

Re: [R] RPostgreSQL libpq problem

2009-08-28 Thread Bunny, lautloscrew.com
Phil, thx a lot for your suggestions.. Luckily I was just able to find a solution. I just recompiled everything, deleting my manually set vars PG_INCDIR and PG_LIBDIR and setting PG_CONFIG=/opt/local/lib/postgresql83/bin/pg_config in line 2564 of the configure file then starting the

Re: [R] Transform data for repeated measures

2009-08-28 Thread David Winsemius
Patrick; You got two helpful suggestions for where to start your learning how to reshape your data. I am going to admit that I have recurring difficulty using either reshape() or the functions in the reshape package. It undoubtedly reflects some sort of constricted abstraction capability

Re: [R] problem plotting with ggplot2

2009-08-28 Thread Gabor Grothendieck
Try removing various lines from your Rprofile.site file found in \Program Files\R\R-2.9.1\etc.Rprofile.site or other startup file; see ?Startup from within R. On Fri, Aug 28, 2009 at 10:57 AM, romunovromu...@gmail.com wrote: Hello Gabor, your suggestion running R in vanilla mode was fruitful.

[R] RODBC: how to set the data-source?

2009-08-28 Thread Oliver Bandel
Hello, I want to try to connect R to PostgreSQL. I have found that there are three ways: DBI or RODBC or RPostgreSQL. I tried around with DBI and RODBC but didn't get it running. In both cases I'm not clear about how to set the driver/data source. I get this error: x channel -

Re: [R] Help with glmer {lme4) function: how to return F or tstatistics instead of z statistics.

2009-08-28 Thread Bert Gunter
R-help is for help on the use of R, not primarily for statistics advice (although this does sometimes occur). Most of your questions are about statistics, so you should probably consult a local statistician for help or post on a more suitable list, perhaps R-sig-mixed-models:

Re: [R] RODBC: how to set the data-source?

2009-08-28 Thread Oliver Bandel
Oliver Bandel oliver at first.in-berlin.de writes: odbcDataSources() named character(0) This looks like nothing is available via RODBC interface. Any idea what's missing? How can I get all names of available drivers? Ciao, Oliver __

Re: [R] Google's R Style Guide

2009-08-28 Thread Henrik Bengtsson
Quite a while ago I put up R Coding Conventions (RCC) - a draft, now at: http://docs.google.com/View?id=dddzqd53_2646dcw759cb It's useful for beginners and those coding randomly. Like it or not. It's ok to try to persuade people coding randomly, but otherwise it is waste of time to get into

Re: [R] Google's R Style Guide

2009-08-28 Thread hadley wickham
It's ok to try to persuade people coding randomly, but otherwise it is waste of time to get into arguing over if-else or bracketing - we all have our own favorite. I totally agree. The main purpose of my style guide is so that my students write code that I can easily read, understand and

Re: [R] Google's R Style Guide

2009-08-28 Thread hadley wickham
An opening curly brace should never go on its own line and should always be followed by a new line; a closing curly brace should always go on its own line. It seems to me that the opening an dosing curly brace should go on their own lines to allow the reader to immediately know what is

Re: [R] Transform data for repeated measures

2009-08-28 Thread Henrique Dallazuanna
Using reshape you can try this: reshape(resp.df, direction = long, idvar=patient, varying = list(grep(fev, names(resp.df On Thu, Aug 27, 2009 at 8:37 PM, Richardson, Patrick patrick.richard...@vai.org wrote: I have a dataset that I'm trying to rearrange for a repeated measures analysis:

Re: [R] Google's R Style Guide

2009-08-28 Thread Kevin Wright
On Fri, Aug 28, 2009 at 11:10 AM, Henrik Bengtsson h...@stat.berkeley.eduwrote: Quite a while ago I put up R Coding Conventions (RCC) - a draft, now at: http://docs.google.com/View?id=dddzqd53_2646dcw759cb It's useful for beginners and those coding randomly. Like it or not. It's ok to

[R] new data.frame summed by date

2009-08-28 Thread Mark Knecht
Hi, I wonder if someone can suggest how to create a new data.frame Y from X where X$PL_Pos is summed by each unique X$MyDate. Y should end up with two (or more) columns Y$MyDate and Y$PL_Sum with its value being the cumsum of all the values in X for that date. - a 'daily cumsum'. Thanks, Mark

Re: [R] Google's R Style Guide

2009-08-28 Thread Erich Neuwirth
But if the closing curly brace marks the end of the if part of an if else statement, the else keyword has to be on the same line as the closing brace. The code will not work if the else is on the next line AFAIK. On Aug 28, 2009, at 6:11 PM, hadley wickham wrote: An opening curly brace

Re: [R] RODBC: how to set the data-source?

2009-08-28 Thread Dumblauskas, Jerry
Looks like Unix If so, make sure your script has the proper paths set Here is my set up for an oracle DB export LD_LIBRARY_PATH=/../../instantclient_11_1:/../../unixODBC64_1/lib export ODBCINI=/../..//unixODBC64_1 export ODBCSYSINI=/../..//unixODBC64_1 And of course you need your db

Re: [R] Google's R Style Guide

2009-08-28 Thread Duncan Murdoch
On 8/28/2009 12:33 PM, Kevin Wright wrote: On Fri, Aug 28, 2009 at 11:10 AM, Henrik Bengtsson h...@stat.berkeley.eduwrote: Quite a while ago I put up R Coding Conventions (RCC) - a draft, now at: http://docs.google.com/View?id=dddzqd53_2646dcw759cb It's useful for beginners and those

Re: [R] How to convert a string passed as an argument to a vector?

2009-08-28 Thread jim holtman
If you have it as a character string, then you have to evaluate it: x - '1:3' x + 10 Error in x + 10 : non-numeric argument to binary operator No suitable frames for recover() eval(parse(text=x))+10 [1] 11 12 13 On Fri, Aug 28, 2009 at 11:04 AM, Peng Yupengyu...@gmail.com wrote: Hi, $

Re: [R] Google's R Style Guide

2009-08-28 Thread Kevin Wright
On Fri, Aug 28, 2009 at 11:49 AM, Duncan Murdoch murd...@stats.uwo.cawrote: On 8/28/2009 12:33 PM, Kevin Wright wrote: On Fri, Aug 28, 2009 at 11:10 AM, Henrik Bengtsson h...@stat.berkeley.edu wrote: Quite a while ago I put up R Coding Conventions (RCC) - a draft, now at:

Re: [R] new data.frame summed by date

2009-08-28 Thread jim holtman
Is this what you want: aggregate(X$PL_Pos, list(X$MyDate), sum) Group.1x 1 2009-08-03 174 2 2009-08-04 -26 3 2009-08-05 614 4 2009-08-06 318 5 2009-08-10 414 6 2009-08-11 -626 7 2009-08-12 544 8 2009-08-13 -106 9 2009-08-17 -146 10 2009-08-19 1004 11 2009-08-20 568 12

Re: [R] new data.frame summed by date

2009-08-28 Thread Mark Knecht
Jim, It looks exactly like what I wanted. Thanks! - Mark On Fri, Aug 28, 2009 at 10:03 AM, jim holtmanjholt...@gmail.com wrote: Is this what you want: aggregate(X$PL_Pos, list(X$MyDate), sum)      Group.1    x 1  2009-08-03  174 2  2009-08-04  -26 3  2009-08-05  614 4  2009-08-06  318

[R] Plotmath, sweave and lattice graphics interaction problem

2009-08-28 Thread Gavin Simpson
Dear List, I have hit this problem with using a plotmath expression in an axis label on a lattice plot I'm including in a Sweave document. The actual document is far too long and boring (unless you are interested in the hydrochemistry of upland lakes) to include here, but the following minimal

Re: [R] Google's R Style Guide

2009-08-28 Thread Henrik Bengtsson
On Fri, Aug 28, 2009 at 9:10 AM, Henrik Bengtssonh...@stat.berkeley.edu wrote: Quite a while ago I put up R Coding Conventions (RCC) - a draft, now at:  http://docs.google.com/View?id=dddzqd53_2646dcw759cb Google Docs seems to have a hiccup when it comes to publishing/sharing docs; here is a

Re: [R] new data.frame summed by date

2009-08-28 Thread milton ruser
Puting my 2cents: newDF-data.frame(aggregate(X$PL_Pos, list(X$MyDate), sum)) colnames(newDF)-c(MyDate,PL_Pos_SUM) good luck milton On Fri, Aug 28, 2009 at 1:03 PM, jim holtman jholt...@gmail.com wrote: Is this what you want: aggregate(X$PL_Pos, list(X$MyDate), sum) Group.1x 1

Re: [R] new data.frame summed by date

2009-08-28 Thread David Winsemius
The request for a date column results in a bit of redundancy beyond what tapply would have produced, but here it is as specified: data.frame(dnames=names(tapply(X$PL_Pos, X$MyDate, sum)), dsums = tapply(X$PL_Pos, X$MyDate, sum) ) dnames dsums 2009-08-03 2009-08-03 174

Re: [R] Transform data for repeated measures

2009-08-28 Thread hadley wickham
On Thu, Aug 27, 2009 at 6:37 PM, Richardson, Patrickpatrick.richard...@vai.org wrote: I have a dataset that I'm trying to rearrange for a repeated measures analysis: It looks like: patient basefev1 fev11h fev12h fev13h fev14h fev15h fev16h fev17h fev18h drug 201     2.46   2.68   2.76  

Re: [R] Google's R Style Guide

2009-08-28 Thread Barry Rowlingson
On Fri, Aug 28, 2009 at 5:11 PM, hadley wickhamh.wick...@gmail.com wrote: In my view, that's the purpose of indenting - you see scope from indenting. *cough* python *cough* Barry __ R-help@r-project.org mailing list

Re: [R] Google's R Style Guide

2009-08-28 Thread Deepayan Sarkar
On Fri, Aug 28, 2009 at 10:02 AM, Kevin Wrightkw.s...@gmail.com wrote: On Fri, Aug 28, 2009 at 11:49 AM, Duncan Murdoch murd...@stats.uwo.cawrote: On 8/28/2009 12:33 PM, Kevin Wright wrote: [...] Now that doesn't sound like the browser.  Whatever debugger you are using has a bug. Duncan

Re: [R] Google's R Style Guide

2009-08-28 Thread Duncan Murdoch
On 8/28/2009 1:02 PM, Kevin Wright wrote: On Fri, Aug 28, 2009 at 11:49 AM, Duncan Murdoch murd...@stats.uwo.ca mailto:murd...@stats.uwo.ca wrote: On 8/28/2009 12:33 PM, Kevin Wright wrote: On Fri, Aug 28, 2009 at 11:10 AM, Henrik Bengtsson h...@stat.berkeley.edu

[R] extracting pvalues from ttest

2009-08-28 Thread 1Rnwb
Hello list, I have a similar issue as this post http://tolstoy.newcastle.edu.au/R/e6/help/09/04/11438.html#options2 and I used the suggestion provided by Jorge with modifications to my data do.call(c,lapply(your_list_with_the_t_tests,function(x) x$p.value)) but I am getting the following error

Re: [R] RODBC: how to set the data-source?

2009-08-28 Thread Oliver Bandel
Dumblauskas, Jerry jerry.dumblauskas at credit-suisse.com writes: Looks like Unix ...well, near by: Linux. If so, make sure your script has the proper paths set Here is my set up for an oracle DB export LD_LIBRARY_PATH=/../../instantclient_11_1:/../../unixODBC64_1/lib export

Re: [R] RODBC: how to set the data-source?

2009-08-28 Thread Dumblauskas, Jerry
So now R can see your odbc ini file -- but at runtime you are still having issues... So it should either be: 1) you have a path not set (for the oracle example below I use LD_LIBRARY_PATH -- not sure about PostGres) 2) your ODBC.ini file doesn't have a line like Driver =

Re: [R] RODBC: how to set the data-source?

2009-08-28 Thread Oliver Bandel
Hi, in /usr/share/doc/r-cran-rodbc/README.gz I found this example: == [testpg] Description = testpg Driver = PostgreSQL Trace = No TraceFile = ServerName = localhost UserName= ripley Port= 5432 Socket = Database=

[R] Pls package

2009-08-28 Thread Payam Minoofar
Hi, I have managed to format my data into a single datframe consisting of two AsIs response and predictor dataframes in order to supply the plsr command of the pls package for principal components analysis. When I execute the command, however, I get this error: fiber1 - plsr(respmat ~

Re: [R] RODBC: how to set the data-source?

2009-08-28 Thread Oliver Bandel
... I also tried this one: r...@siouxsie:~# odbcinst -q -d odbcinst: SQLGetPrivateProfileString failed with . r...@siouxsie:~# failed with . ... what a verbose and detailed error message :-( Oliver __ R-help@r-project.org mailing list

Re: [R] RODBC: how to set the data-source?

2009-08-28 Thread Dumblauskas, Jerry
OK Is your PostGres server on the same Linux box you are running R on? Sample values Server = 169.49.30.69 (localhost host means you are on the same box) Port= 2700 (make sure your port is correct) Also, I am not seeing your id and password I use the signature CONNREAD

Re: [R] extracting pvalues from ttest

2009-08-28 Thread Jun Shen
I never used by. Is B a list? If not, I am not sure if lapply can take it. Try aggregate(). On Fri, Aug 28, 2009 at 10:53 AM, 1Rnwb sbpuro...@gmail.com wrote: Hello list, I have a similar issue as this post http://tolstoy.newcastle.edu.au/R/e6/help/09/04/11438.html#options2 and I used the

[R] sub using info from pattern in 2nd col into part of pattern in 1st column?

2009-08-28 Thread Chuck Carey
I have two data.frame columns and I want to replace part of the first column with the second column : temp-data.frame(matrix(c(54E5,7,56D7,E3,56F12,14,56F3,10,57C5,NA,59A1,3), ncol = 2)) if the 2nd column consists entirely of digits (1 or 2 digits) I want to replace the last digit(s) in the

[R] Calling C funtion from R help Needed

2009-08-28 Thread naresh4836
Hello Forum, I'm calling C function from R.It is a small sample trial program. The C function will accept a character and a integer and print them. It is printing some special character instead of input character. Below are the C function, Wrapper code ,R code and R output. Please help me in

[R] std.error

2009-08-28 Thread Mcdonald, Grant
dear sir, i am trying to calculate the standard error of my data (x), i have tried se(x, na.rm=TRUE) and std.error(x) neither have worked and i cannot find an alternative sorry to bother with such a basic problem __ R-help@r-project.org mailing list

Re: [R] Google's R Style Guide

2009-08-28 Thread Kingsford Jones
A few thoughts: -- As for naming preferences, in an interactive R session or answering an R-help question I'm glad I can type lm(log(y) ~ atan(x)) rather than FitLinearModel(CalculateNaturalLogarithm(y) ~ CalculateInverseTangent(x)) -- For consistency, their function makeColName(...) should

Re: [R] CHAID in R

2009-08-28 Thread Wensui Liu
well, are you sure if party() can implement chaid? i doubt if chaid is being implemented in any R package. On Fri, Aug 28, 2009 at 7:50 AM, Arup arup.pramani...@gmail.com wrote: Hi..I am trying to run CHAID in R..I have installed the sofyware Party and trying to use the function ctree() to

  1   2   >