Re: [R] find unique and summerize

2018-02-02 Thread Rui Barradas
Hello, Thanks for the reproducible example. See if the following does what you want. IDNum <- sub("^(\\d+).*", "\\1", mydata$ID) Country <- sub("^\\d+(.*)", "\\1", mydata$ID) tbl1 <- table(Country, IDNum) addmargins(tbl1) tbl2 <- xtabs(Y ~ Country + IDNum, mydata) addmargins(tbl2) Hope this

[R] find unique and summerize

2018-02-02 Thread Val
Hi all, I have a data set need to be summarized by unique ID (count and sum of a variable) A unique individual ID (country name Abbreviation followed by an integer numbers) may have observation in several countries. Then the ID was changed by adding the country code as a prefix and new ID

[R] [R-pkgs] new R package bigleaf

2018-02-02 Thread Jürgen Knauer
Dear R users, we are pleased to announce the release of the 'bigleaf' R package. This package is useful for the calculation of physical (e.g. aerodynamic conductance, surface temperature), and physiological (e.g. canopy conductance, intrinsic water-use efficiency) ecosystem properties from edd

Re: [R] Updating Rcpp package when it is claimed by dplyr

2018-02-02 Thread Jeff Newmiller
Be sure to not put a space between the "---" and the "vanilla". -- Sent from my phone. Please excuse my brevity. On February 2, 2018 1:35:07 PM PST, Patrick Connolly wrote: >On Fri, 02-Feb-2018 at 10:25AM +0100, peter dalgaard wrote: > >|> Or, to avoid accusing you of lying. what you think is "

Re: [R] command line fails

2018-02-02 Thread Michael Ashton
Thans Dan. It seems that it may be an issue with 3.4.3...I'm going to attempt a patch this weekend. The code works fine from the command line in 3.2.5! Michael Ashton, CFA Managing Principal Enduring Investments LLC W: 973.457.4602 C: 551.655.8006 -Original Message- From: Daniel Nordlu

Re: [R] command line fails

2018-02-02 Thread Daniel Nordlund
On 2/2/2018 4:52 AM, Michael Ashton wrote: Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r window

Re: [R] Updating Rcpp package when it is claimed by dplyr

2018-02-02 Thread Patrick Connolly
On Fri, 02-Feb-2018 at 10:25AM +0100, peter dalgaard wrote: |> Or, to avoid accusing you of lying. what you think is "vanilla" |> probably isn't. What exactly did you do? On Unix-likes, I would do |> something like this |> echo 'options(repos=list(CRAN="cran.r-project.org"));install.packages("Rc

Re: [R] command line fails

2018-02-02 Thread Enrico Schumann
On Fri, 02 Feb 2018, Michael Ashton writes: > Where can I get the patch? I've never installed a patch for R...usually just > upgrade. > > Michael Ashton, CFA > Managing Principal > > Enduring Investments LLC > W: 973.457.4602 > C: 551.655.8006 > The patched build (i.e. a complete version, not ju

Re: [R] command line fails

2018-02-02 Thread Enrico Schumann
Quoting Michael Ashton : Fascinating. The script runs fine in 3.2.5, but won't run in 3.4.3 even with ALL lines commented out. I have no idea what that means. I can't imagine I found a 3.4.3 bug no one knows about. Michael Ashton, CFA Managing Principal Enduring Investments LLC W: 973.4

Re: [R] command line fails

2018-02-02 Thread Michael Ashton
Fascinating. The script runs fine in 3.2.5, but won't run in 3.4.3 even with ALL lines commented out. I have no idea what that means. I can't imagine I found a 3.4.3 bug no one knows about. Michael Ashton, CFA Managing Principal Enduring Investments LLC W: 973.457.4602 C: 551.655.8006 -O

[R] mpfr and gsl problem on SLES11 SP4

2018-02-02 Thread syslog syslog
Dear Team, Maybe somebody already tried to install mpfr and gsl packages for R on SLES. Exactly I try to install Rmpfr_0.6-1.tar.gz and gsl_1.9-10.3.tar.gz on SLES11 SP4. These are the available packages from official SLES SDK media: rtest:/home/ruser # rpm -qa | grep -i gsl gsl-devel-1.11-1

Re: [R] command line fails

2018-02-02 Thread Duncan Murdoch
On 02/02/2018 8:20 AM, Michael Ashton wrote: I don't think it's the path or the slashes. I run other files in this same manner, with the same path to the script itself, and they go off without a hitch. Although this is the first time I am using 3.4.3, and the only script I am using that versio

Re: [R] command line fails

2018-02-02 Thread Michael Ashton
I don't think it's the path or the slashes. I run other files in this same manner, with the same path to the script itself, and they go off without a hitch. Although this is the first time I am using 3.4.3, and the only script I am using that version of R for at the moment. Having said that, I

Re: [R] command line fails

2018-02-02 Thread Duncan Murdoch
On 02/02/2018 7:52 AM, Michael Ashton wrote: Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r wind

[R] command line fails

2018-02-02 Thread Michael Ashton
Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r window simply flashes and closes. There's probably

Re: [R] Updating Rcpp package when it is claimed by dplyr

2018-02-02 Thread peter dalgaard
Or, to avoid accusing you of lying. what you think is "vanilla" probably isn't. What exactly did you do? On Unix-likes, I would do something like this echo 'options(repos=list(CRAN="cran.r-project.org"));install.packages("Rcpp")' | R --vanilla (or maybe https://cloud.r-project.org is better...)