[R] Grouping Question

2020-03-21 Thread Thomas Subia via R-help
Colleagues, Here is my dataset. Serial Measurement Meas_test Serial_test 1 17 failfail 1 16 passfail 2 12 passpass 2 8 passpass 2 10 pass

Re: [R-es] Tasa variación diaria COVID-19

2020-03-21 Thread Javier Marcuzzi
Estimado Javier Gómez Gonzalez No estoy seguro de lo que usted dice, pero no importa. ¿Usted tiene conocimientos de epidemiología? Cuidado, es parte de la medicina, se debe tener matrícula. Sin embargo, si quiere entretenerse, mire en la página 198 lo siguiente, The dataset Montana was extracted

Re: [R] No predict method for hbrfit

2020-03-21 Thread David Winsemius
On 3/21/20 4:09 PM, varin sacha via R-help wrote: Dear R-helpers, Using the HBR (high breakdown rank-based) robust estimator and the hbrfit function, I get an error saying Error in UseMethod("predict") for hbrfit. How can I solve the problem ? Many thanks for your help. What makes you

Re: [R] No predict method for hbrfit

2020-03-21 Thread Jeff Newmiller
Don't use packages that haven't been maintained. Or correspond with the author. Or, fix them yourself. On March 21, 2020 4:09:13 PM PDT, varin sacha via R-help wrote: >Dear R-helpers, > >Using the HBR (high breakdown rank-based) robust estimator and the >hbrfit function, I get an error saying

Re: [R] How to save output of multiple loops in a matrix

2020-03-21 Thread Jeff Newmiller
You really need to pick small problems and build solutions for them as functions rather than copy-pasting code. Then you can build more complicated solutions using those small solutions that can actually be understood. I suspect that in a few days you would not understand your own code because

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

2020-03-21 Thread varin sacha via R-help
Dear R-helpers, Another problem with FastTau function from the RobPer packages. Any solution to solve my problem would be highly appreciated. # # # # # # # # # # # # # # # # # # # # # # # # install.packages( "boot",dependencies=TRUE ) install.packages( "RobPer",dependencies=TRUE  )

[R] No predict method for hbrfit

2020-03-21 Thread varin sacha via R-help
Dear R-helpers, Using the HBR (high breakdown rank-based) robust estimator and the hbrfit function, I get an error saying Error in UseMethod("predict") for hbrfit. How can I solve the problem ? Many thanks for your help. # # # # # # # # # # # # # # # # # # # # # # # # install.packages(

Re: [R-es] Tasa variación diaria COVID-19

2020-03-21 Thread Javier Marcuzzi
Estimado Javier Gómez Gonzalez Lo deseas realizar como ejercicio personal o lo necesitas para un trabajo de salud pública, periodismo, información que necesitan rápido. Si hay urgencia, desde este lado del océano mañana puedo dedicarles algo de tiempo con sus datos, aquí la situación es

Re: [R] Strange error message, many thanks

2020-03-21 Thread varin sacha via R-help
David, Great... exactly what I was looking for... Many thanks. Le samedi 21 mars 2020 à 21:12:31 UTC+1, David Winsemius a écrit : On 3/21/20 12:56 PM, varin sacha wrote: > Hi David, > > Perfect I got it now. One last precision, if I want to get the MSE value how > can I get it ?

Re: [R] Strange error message, many thanks

2020-03-21 Thread David Winsemius
On 3/21/20 12:56 PM, varin sacha wrote: Hi David, Perfect I got it now. One last precision, if I want to get the MSE value how can I get it ? If I understand your question, it is answered in the help page: help(boot,pack=boot) # See the "Value" section  str(results) # List of 11 # $

Re: [R] Strange error message, many thanks

2020-03-21 Thread varin sacha via R-help
Hi David, Perfect I got it now. One last precision, if I want to get the MSE value how can I get it ? Le samedi 21 mars 2020 à 20:26:37 UTC+1, David Winsemius a écrit : On 3/21/20 12:18 PM, varin sacha wrote: >   mean((d[["y_obs "]] - ypred)^2)

Re: [R-es] Tasa variación diaria COVID-19

2020-03-21 Thread palazon
Hola: Usa la función diff diff( seq( 0, 100, by = 10 ) ) [1] 10 10 10 10 10 10 10 10 10 10 Quizá te pueda interesar este enlace: https://github.com/datadista/datasets/tree/master/COVID%2019 Incluye los script para manejar la información. Seguimos El 21/3/20 a las 18:42, Javier Gómez

Re: [R] Strange error message, many thanks

2020-03-21 Thread David Winsemius
On 3/21/20 12:18 PM, varin sacha wrote: > mean((d[["y_obs "]] - ypred)^2) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Strange error message, many thanks

2020-03-21 Thread varin sacha via R-help
Hi Duncan, Hi David, Many thanks, ok for the first error but David when you say "The second error is the misspelling . Remove the space". Where do I have to remove the space ? Best, Sacha Le samedi 21 mars 2020 à 18:14:30 UTC+1, David Winsemius a écrit : On 3/21/20 9:35 AM, varin

[R-es] Tasa variación diaria COVID-19

2020-03-21 Thread Javier Gómez Gonzalez
Hola: Tengo los datos diarios del número de casos de coronavirus por comunidades autónomas y quiero calcular el número diario de nuevos casos y la tasa diaria de variación del número de casos y no se como hacerlo en R. *fecha* *comunidad* *poblacion* *casos_totales* 04/03/2020 Andalucía

Re: [R] Strange error message, many thanks

2020-03-21 Thread David Winsemius
On 3/21/20 9:35 AM, varin sacha via R-help wrote: Dear R-experts, Here below my R code giving an error message that I don't understand. If somebody can help me to fix it, it would be highly appreciated. # # # # # # # # # # # # # # # # # # # # # # # # install.packages(

Re: [R] How to save output of multiple loops in a matrix

2020-03-21 Thread Ioanna Ioannou
Hello again, Here is the reproducible example: rm(list = ls()) library(plyr) library(dplyr) library( data.table) library(stringr) d1 <- data.frame( Name = rep(c('Hancilar et. al (2014) - CR/LDUAL school - Case V (Sd)', 'Rojas(2010) - CR/LFM/DNO 2storey',

Re: [R] Strange error message, many thanks

2020-03-21 Thread Duncan Murdoch
On 21/03/2020 12:35 p.m., varin sacha via R-help wrote: # # # # # # # # # # # # # # # # # # # # # # # # install.packages( "robustbase",dependencies=TRUE ) install.packages( "boot",dependencies=TRUE ) library(boot) library(robustbase) n<-500 b<-runif(n, 0, 5) z <- rnorm(n, 2, 3) a <- runif(n, 0,

[R] Strange error message, many thanks

2020-03-21 Thread varin sacha via R-help
Dear R-experts, Here below my R code giving an error message that I don't understand. If somebody can help me to fix it, it would be highly appreciated. # # # # # # # # # # # # # # # # # # # # # # # # install.packages( "robustbase",dependencies=TRUE ) install.packages( "boot",dependencies=TRUE

Re: [R] How to save output of multiple loops in a matrix

2020-03-21 Thread Jeff Newmiller
You have again posted using HTML and the result is unreadable. Please post a reproducible example using dput instead of assuming we can read your formatted code or table. On March 21, 2020 8:59:58 AM PDT, Ioanna Ioannou wrote: >Hello everyone, > >I am having this data.frame. For each row you

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

2020-03-21 Thread William Dunlap via R-help
Try using the I() function in the call to data.frame. E.g., > d <- data.frame(X=1:3, Y=1:3, Substance=I(expression(H[2]*O, H[2] * O[2], H*S*O[4]))) > with(d, {plot(X,Y,type="n",xlim=c(0,4)); text(X, Y, Substance)}) Bill Dunlap TIBCO Software wdunlap tibco.com On Sat, Mar 21, 2020 at 1:45 AM

[R] How to save output of multiple loops in a matrix

2020-03-21 Thread Ioanna Ioannou
Hello everyone, I am having this data.frame. For each row you have 26 values aggregated in a cell and separated by a comma. I want to do some calculations for all unique names and taxonomy which include the four different damage states. I can estimate the results but i am struggling to save

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

2020-03-21 Thread Troels Ring
Dear friends - I have some old data of chemical results and want to annotate the points with chemical formula. If I just do ID <- c("HCl 7","HCl 5.25","HCl 3.5","HCL 7 no Na","HCl 3.5 No Na", "HSO4 7 no Na", "HNO3 7 No Na") I can make a data.frame like DD <- data.frame(x=1:7,ID)