Re: [R] installing R 3.5.1

2018-08-25 Thread Berwin A Turlach
G'day Bogdan, On Fri, 24 Aug 2018 18:28:59 -0700 Bogdan Tanasa wrote: > I am trying to install R 3.5.1 on my Ubuntu 14.04 system; however, I > am getting the following message : > > sudo apt-get install r-base > [...] > The following packages have unmet dependencies: > r-base : Depends: r-reco

Re: [R] installing R 3.5.1

2018-08-25 Thread Benoit Vaillant
Hello Bogdan, This reply is off topic for the list, appologies. This problem is more r-sig-debian related (see below). Though Berwin already mentionned a possible solution, here is another. On Fri, Aug 24, 2018 at 06:28:59PM -0700, Bogdan Tanasa wrote: > I am trying to install R 3.5.1 on my Ubun

Re: [R] Plots in ioslides and R markdown

2018-08-25 Thread Patrick Connolly
I've simplified it so that it's reproducible: --- title: "Barking up the wrong tree" author: "Patrick Connolly" date: "`r format(Sys.time(), '%a %d/%m/%Y %H:%M')`" output: ioslides_presentation: default slidy_presentation: default beamer_presentation: default --- ```{r global_options, echo

Re: [R] Plots in ioslides and R markdown

2018-08-25 Thread Duncan Murdoch
On 25/08/2018 6:21 AM, Patrick Connolly wrote: --- title: "Barking up the wrong tree" author: "Patrick Connolly" date: "`r format(Sys.time(), '%a %d/%m/%Y %H:%M')`" output: ioslides_presentation: default slidy_presentation: default beamer_presentation: default --- ```{r global_options,

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-25 Thread Dirk Eddelbuettel
Rolf, I noticed this thread started by you as well as a few of the excellent follow-ups. While it conclcuded, allow me a few quick comments: - Some of us go through some effort to provide R on Ubuntu (and Debian) in a reliable and reproducible manner. And it works and is used by many people

[R] NaN in Scoring Sentiment

2018-08-25 Thread Shivi Bhatia
Hi All- I am running a sentiment scoring model and the code is as below: sentiments_per_Category <- aggregate(relative_sentiment_frequencies, by = list(Category = df$Case.Category), mean) while i run the head command most of the values are NaN. i then used comp

Re: [R] NaN in Scoring Sentiment

2018-08-25 Thread Jeff Newmiller
Did you keep the resulting complete cases version of df? dfc <- df[complete.cases(df),] and then use that as input? On August 25, 2018 7:00:47 AM PDT, Shivi Bhatia wrote: >Hi All- I am running a sentiment scoring model and the code is as >below: >sentiments_per_Category <- aggregate(relative_se

[R] installing R 3.5.1

2018-08-25 Thread Bogdan Tanasa
Dear Benoit, many thanks for your suggestions. Have a good weekend ! Message: 26 Date: Sat, 25 Aug 2018 11:13:49 +0200 From: Benoit Vaillant To: Bogdan Tanasa Cc: r-help Subject: Re: [R] installing R 3.5.1 Message-ID: <20180825091348.7tidm7fvhiudr...@auroras.fr> Content-Type: text/plain; charse

Re: [R] installing R 3.5.1

2018-08-25 Thread Bogdan Tanasa
Dear Berwin, thank you for your help. On my system, after "sudo apt-get install r-base r-recommended", it says : [..] The following packages have unmet dependencies: r-recommended : Depends: r-cran-kernsmooth (>= 2.2.14) but it is not going to be installed Depends: r-cran-mass bu

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-25 Thread Berwin A Turlach
G'day Rolf, On Sat, 25 Aug 2018 11:20:09 +1200 Rolf Turner wrote: > I was pretty sure that the foregoing was a complete red herring. And > I was right. I am not sure whether I agree. :) > I have been told by younger and wiser heads that installing from > source is The Right Thing to Do. Yo

Re: [R] installing R 3.5.1

2018-08-25 Thread Berwin A Turlach
Dear Bogdan, On Sat, 25 Aug 2018 07:24:40 -0700 Bogdan Tanasa wrote: > installed E: Unable to correct problems, you have held broken > packages. Perhaps this is the problem, did you try "apt-get -f install"? Cheers, Berwin __ R-help@r-proje

Re: [R] installing R 3.5.1

2018-08-25 Thread Bogdan Tanasa
Dear Berwin, thank you very much . I guess that I shall update my Ubuntu OS ; after "sudo apt-get -f install", I am getting the same message : The following packages have unmet dependencies: r-recommended : Depends: r-cran-kernsmooth (>= 2.2.14) but it is not going to be installed

Re: [R] Multiple counters in a single for loop

2018-08-25 Thread Jeff Newmiller
look at the map2 function in the purrr package. On August 24, 2018 6:44:19 AM PDT, Deepa wrote: >Hello, > >Is there an option to include multiple counters in a single for loop in >R? > >For instance, in python there is > >for i,j in zip(x,range(0,len(x))): > > >Any suggestions? > > [[altern

Re: [R] Multiple counters in a single for loop

2018-08-25 Thread jeremiejuste
Hello, I'm aware it is not the answer you are expecting but indexes are not that bad to implement as well. for ( i in 1:length(var1)){ elem1 <-var1[i] elem2 <- var2[i] } if you want more abstraction you could then wrap that up in a function HTHOn 25 Aug 2018 18:57, Jeff Newmiller wrote: > >

Re: [R] Multiple counters in a single for loop

2018-08-25 Thread Duncan Murdoch
On 25/08/2018 1:47 PM, jeremieju...@gmail.com wrote: Hello, I'm aware it is not the answer you are expecting but indexes are not that bad to implement as well. for ( i in 1:length(var1)){ This is generally a bad idea: if length(var1) == 0, it does the wrong thing, since 1:0 is c(1L, 0L). B

Re: [R] Plots in ioslides and R markdown

2018-08-25 Thread Patrick Connolly
On Sat, 25-Aug-2018 at 07:53AM -0400, Duncan Murdoch wrote: |> On 25/08/2018 6:21 AM, Patrick Connolly wrote: |> >--- |> >title: "Barking up the wrong tree" |> >author: "Patrick Connolly" |> >date: "`r format(Sys.time(), '%a %d/%m/%Y %H:%M')`" |> >output: |> > ioslides_presentation: default |> >

Re: [R] Plots in ioslides and R markdown

2018-08-25 Thread Duncan Murdoch
On 25/08/2018 7:37 PM, Patrick Connolly wrote: On Sat, 25-Aug-2018 at 07:53AM -0400, Duncan Murdoch wrote: |> On 25/08/2018 6:21 AM, Patrick Connolly wrote: |> >--- |> >title: "Barking up the wrong tree" |> >author: "Patrick Connolly" |> >date: "`r format(Sys.time(), '%a %d/%m/%Y %H:%M')`" |> >o

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-25 Thread Rolf Turner
On 08/26/2018 02:59 AM, Berwin A Turlach wrote: G'day Rolf, On Sat, 25 Aug 2018 11:20:09 +1200 Rolf Turner wrote: I was pretty sure that the foregoing was a complete red herring. And I was right. I am not sure whether I agree. :) Huh? Black is white and up is down??? I did as advise

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-25 Thread Berwin A Turlach
G'day Rolf, On Sun, 26 Aug 2018 13:00:34 +1200 Rolf Turner wrote: > On 08/26/2018 02:59 AM, Berwin A Turlach wrote: > > > I am not sure whether I agree. :) > > Huh? Black is white and up is down??? Nope, but as I said, on my machine RStudio and the R installed from the Ubuntu repositories w

Re: [R] Plots in ioslides and R markdown

2018-08-25 Thread Jeff Newmiller
a) Duncan, he provided sessionInfo below his reprex. b) Patrick: you appear to be trying to use a common file to generate multiple output formats. I will caution you that I have found considerable disappointment in trying that, and suggest that you focus your efforts on one output format for ea