Re: [R] cannot coerce class '"expression"' to a data.frame

2020-03-22 Thread Troels Ring
Thanks a lot - this does indeed do the trick! -Oprindelig meddelelse- Fra: peter dalgaard Sendt: 21. marts 2020 18:08 Til: Troels Ring Emne: Re: [R] cannot coerce class '"expression"' to a data.frame Oops, disregard previous... I'm no ggplot expert, but google "ggplot plotmath" sugges

Re: [R] Fwd: Package PCMBaseCpp stops the R process on Fedora-clang

2020-03-22 Thread Jeff Newmiller
Wrong list. Way wrong. Pay attention to the Posting Guide. The correct list would be the Rcpp-devel. If your question were less specific, then r-package-devel. But absolutely not r-help. There are known issues with Rcpp being fixed right now on the fly... go read the recent archives for Rcpp-de

[R] Fwd: Package PCMBaseCpp stops the R process on Fedora-clang

2020-03-22 Thread Venelin Mitov
Dear R-help-list, In an e-mail received yesterday from a member of the CRAN maintainer team, I was informed that the package PCMBaseCpp (https://CRAN.R-project.org/package=PCMBaseCpp) is going to be removed from CRAN on April 4th, due to an R-process crash during unit-tests on the fedora-clang fla

Re: [R] Error in FastTau(formula, data = d) : unused argument(s) (data = d)

2020-03-22 Thread varin sacha via R-help
Hi Rui, Many thanks... it perfectly works Best, Sacha Le dimanche 22 mars 2020 à 11:02:49 UTC+1, Rui Barradas a écrit : Correction: In MSE modmat <- model.matrix(as.formula(formula), data = d) doesn't need as.formula, it should be modmat <- model.matrix(formula, data = d) So

Re: [R] No predict method for hbrfit

2020-03-22 Thread varin sacha via R-help
Hi Jeff, Hi David, Thanks for your responses. As the predict function does not work with hbrfit, I have tried  something without the predict function. There is an error message (Error in .subset2(x, i, exact = exact)) unclear to me. Many thanks for your help. # # # # # # # # # # # # # # # # #

Re: [R] [FORGED] Grouping Question

2020-03-22 Thread peter dalgaard
Or even split -> lapply -> unsplit, in cases where you want the results put back in the original order. (Doesn't matter here, but it would, had it been, say, ordered 1,2,3,1,2,2,3). -pd > On 22 Mar 2020, at 08:44 , Deepayan Sarkar wrote: > > Another possible approach is to use split -> lappl

Re: [R] Error in FastTau(formula, data = d) : unused argument(s) (data = d)

2020-03-22 Thread Rui Barradas
Correction: In MSE modmat <- model.matrix(as.formula(formula), data = d) doesn't need as.formula, it should be modmat <- model.matrix(formula, data = d) Sorry, rui Barradas Às 09:59 de 22/03/20, Rui Barradas escreveu: Hello, 1. There is no need to install package 'boot', it's a base pack

Re: [R] Error in FastTau(formula, data = d) : unused argument(s) (data = d)

2020-03-22 Thread Rui Barradas
Hello, 1. There is no need to install package 'boot', it's a base package. 2. The question. The problem is that FastTau returns an object of class "list" and there is no 'predict' method for lists, you will have to define your own. This is easy, it's just a matrix multiply. And you are not cal

Re: [R] [FORGED] Grouping Question

2020-03-22 Thread Rolf Turner
On 22/03/20 8:44 pm, Deepayan Sarkar wrote: Another possible approach is to use split -> lapply -> rbind, which I often find to be conceptually simpler: d <- data.frame(Serial = c(1, 1, 2, 2, 2, 3, 3), Measurement = c(17, 16, 12, 8, 10, 19, 13)) dlist <- split(d, d$Serial) d

Re: [R] [FORGED] Grouping Question

2020-03-22 Thread Deepayan Sarkar
Another possible approach is to use split -> lapply -> rbind, which I often find to be conceptually simpler: d <- data.frame(Serial = c(1, 1, 2, 2, 2, 3, 3), Measurement = c(17, 16, 12, 8, 10, 19, 13)) dlist <- split(d, d$Serial) dlist <- lapply(dlist, within, { Serial_test <-