Re: [R] Tidyverse data frame conversion from monthly to annual

2019-03-03 Thread PIKAL Petr
Hi aggregate is another option. aggregate(df[, 2:4], list(df$Year), sum) Cheers Petr > -Original Message- > From: R-help On Behalf Of > p...@philipsmith.ca > Sent: Monday, March 4, 2019 4:15 AM > To: r-help@r-project.org > Subject: [R] Tidyverse data frame conversion from monthly to

[R] Multilevel models

2019-03-03 Thread Saul Weaver
Hello, I have data with workers within departments. I am interested in testing the effects of peers' satisfaction on employees' productivity. To assess peer satisfaction, I calculate, for each employee, the average satisfaction of the employees' peers within the department. In other words, I

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane
Thanks Rui, Depending on how I try to install I get a different error. I am starting to think that somehow the Ubuntu installation may be faulty. I used a ISO that I had burned about a year ago. I had no problem then with a shared installation but who knows. sudo apt-get update sudo apt-get

[R] Multilevel moderated mediation

2019-03-03 Thread Shaul Oreg
Hello, I am trying to run a *multilevel moderated mediation model in R*, with data nested in three levels (children, within classes, within schools). All of my variables are at the individual level, but I still need to account for the nested nature of the data. In separate analyses of

Re: [R] Tidyverse data frame conversion from monthly to annual

2019-03-03 Thread phil
summarise_all() does the trick. Thanks very much for the help. Philip On 2019-03-03 22:14, p...@philipsmith.ca wrote: I have a data frame in which the first column is a sequence of monthly dates and the other columns are variables. There are a great many variables. I want to create another

Re: [R] Tidyverse data frame conversion from monthly to annual

2019-03-03 Thread Amit Mittal
Try using time series objects in xts. Should be easy. At worst once the xts object is automatically arranged by date you have to note the row numbers for each year period and I think data would be ok to handle unless it is more than 30-40 years when you would look up other xts options. Xts

Re: [R] Tidyverse data frame conversion from monthly to annual

2019-03-03 Thread Jeff Newmiller
?summarise_all See the examples. On March 3, 2019 7:14:55 PM PST, p...@philipsmith.ca wrote: >I have a data frame in which the first column is a sequence of monthly >dates and the other columns are variables. There are a great many >variables. I want to create another data frame similar to the

[R] Tidyverse data frame conversion from monthly to annual

2019-03-03 Thread phil
I have a data frame in which the first column is a sequence of monthly dates and the other columns are variables. There are a great many variables. I want to create another data frame similar to the first one, but with annual values instead of monthly, created by summing the months within each

Re: [R-es] Consulta eliminar columna autómatica

2019-03-03 Thread Jorge I Velez
Quizás write.table(.., row.names = FALSE) ? Saludos, Jorge.- El El dom, 3 de mar. de 2019 a las 11:18 a. m., Andrés Hirigoyen < andreshirigo...@gmail.com> escribió: > Buenas tardes, estoy intentando guardar una salida como archivo .xlsx, pero > necesito que la primer columna generada (que

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
Cancel my mailing that source.list. to r-sig-debian.  I took one last look at the sources.list file and realised that I had the same repository repeated. I had read it as being commented out but it was not. Delete one line and I was fine.  Nothing like blindness! I must have scanned that thing

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
Will do. Thanks.  On Sunday, March 3, 2019, 3:59:14 p.m. EST, Ista Zahn wrote: Hi John, This is not the place, but if you post your /etc/apt/sources.list to r-sig-debian I might be able to help you sort it out. Best, Ista On Sun, Mar 3, 2019 at 2:08 PM John Kane wrote: > > Thanks

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread Ista Zahn
Hi John, This is not the place, but if you post your /etc/apt/sources.list to r-sig-debian I might be able to help you sort it out. Best, Ista On Sun, Mar 3, 2019 at 2:08 PM John Kane wrote: > > Thanks Ista, > > Interestingly enough, I have only one repository as far as I can see. I was a >

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
Thanks Ista, Interestingly enough, I have only one repository as far as I can see. I was a bit amazed. I think I have a faulty Ubuntu installation and will have to reinstall. What fun   On Sunday, March 3, 2019, 1:16:52 p.m. EST, Ista Zahn wrote: Hi John, The official instructions at

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread Ista Zahn
Hi John, The official instructions at https://cran.r-project.org/bin/linux/ubuntu/ work on a fresh ubuntu:bionic from dockerhub. This suggests that the issue is due to the configuration of your local system rather than with any problem with either R or ubuntu. My guess is that you've been reading

[R-es] Consulta eliminar columna autómatica

2019-03-03 Thread Andrés Hirigoyen
Buenas tardes, estoy intentando guardar una salida como archivo .xlsx, pero necesito que la primer columna generada (que indica el número de registros) en todo data.frame no se guarde. En el ejemplo es tengo 8 registros y grupo edad 1 28 1 30 2 24 1 45 3 30 1 44 4 24 1

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread Rui Barradas
Hello, I never installed R on Ubuntu like you did it. I follow this: sudo apt-get update sudo apt-get install r-base sudo apt-get install r-base-dev And it works at the first try. See [1] The problems I [always] have are with missing Ubuntu libs needed by contributed packages, not with base

[R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
NOTE. This is a re-post of a message of Saturday 2018-03-03 sent with an incorrect header. To upgrade to R.3.5.2 from 3.4.4 I have been following the instructions at https://www.r-bloggers.com/installation-of-r-3-5-on-ubuntu-18-04-lts-and-tips-for-spatial-packages/ . I seem to have the

Re: [R] Remove Even Number from A Vector

2019-03-03 Thread Duncan Murdoch
On 03/03/2019 3:44 a.m., Ivan Krylov wrote: Hi Darren, On Sat, 2 Mar 2019 22:27:55 + Darren Danyluk wrote: It sounds like she is working with the very basics of this software, and her task is to write the code which would result in the extraction of "odd" data from a dataset of

Re: [R] R installation Ubuntu 10.04 missing dependency

2019-03-03 Thread Eric Berger
Hi John, Is the subject line of your question correct? Ubuntu 10.04? If that is not a typo, that could be contributing to your problem. I believe that the current stable release of Ubuntu is 18.04. According to the following link ubuntu 10.04 was released almost 10 years ago and was "retired"

Re: [R] Remove Even Number from A Vector

2019-03-03 Thread Ivan Krylov
Hi Darren, On Sat, 2 Mar 2019 22:27:55 + Darren Danyluk wrote: > It sounds like she is working with the very basics of this software, > and her task is to write the code which would result in the > extraction of "odd" data from a dataset of restaurant sales. Not a native English speaker