[R] impute.transcan missing original variables

2021-06-03 Thread maicel
I’m trying to select only one dataframe, after performing an imputation with aregImpute and impute.transcan. However, I cannot get back a variable that was kept out of the imputation model. Can somebody tell me how to do it? If we illustrate this problem using the following reproducible

[R] incidence_fit model for simulation

2020-04-24 Thread maicel
Hello How can I make a prediction with object type incidence_fit. incidence_fit object is returned by the function fit in library(incidence). Best regard maicel -- Este mensaje le ha llegado mediante el servicio de correo

[R] purrr::map and xml2:: read_xml

2017-01-06 Thread maicel
/kwd") %>% xml_text(trim=T) }) Thank you, Maicel Monzon MD, PHD -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sist

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-05 Thread maicel
Sorry, what I wanted to do was to add a total row at the end of the summary. The marginal totals by columns correspond to 100% and the sum of levels. best reagard Maicel Monzon Ulrik Stervbo <ulrik.ster...@gmail.com> escribió: Yes. But in the sample code the data is summarised. In

Re: [R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread maicel
Thank you!!! It's what I needed. best regard Maicel Monzon, PHD Centro Nacional de Ensayos Clinicos Ulrik Stervbo <ulrik.ster...@gmail.com> escribió: If you want the total number of rows in the original data.frame after counting the rows in each group, you can ungroup and sum the row

[R] dplyr : row total for all groups in dplyr summarise

2016-07-04 Thread maicel
Hello, How can I aggregate row total for all groups in dplyr summarise ? library(dplyr) mtcars %>% group_by (am, gear) %>% summarise (n=n()) %>% mutate(rel.freq = paste0(round(100 * n/sum(n), 0), "%")) best r

[R] extract all dataframes from list

2015-10-06 Thread maicel
Hello List, I have list of named dataframe. How can I extract all dataframes from this list? The dataframe names should be the same of the original list. May I use the lapply function? Thanks for your help. Best regards, Maicel Monzon, MD National Center of Clinical Trials Havana, Cuba

[R] read Epidata level labels from R

2015-10-03 Thread maicel
it? Thanks for your help. Best regards, Maicel Monzon ,MD National Center of Clinical Trials Havana, Cuba -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este

[R] table

2015-03-02 Thread maicel
= 1 to 16 #8721;i, #8721;j, #8721;k If you could help me to obtain a function to get such table I would appreciate very much. Best and thank you…. maicel monzon MD. MSc. -- Este mensaje le ha llegado mediante el servicio

[R] Unique values in dataframe columns

2014-09-25 Thread Maicel Monzón Pérez
”, NA”, white”), z= c(T,F,T,T), J= c(2,7,8,9)) Library(DescTools) list-GetAllSubsets(c(NA,0,1,2,yes,y,no),min.n = 2, max.n = 5) ..and to obtain the following vector.. TRUE,FALSE, FALSE, FALSE Best regards Maicel Monzon -- Nunca digas nunca, di mejor: gracias, permiso, disculpe. Este

[R] script to data clear

2014-08-12 Thread Maicel Monzón Pérez
Hello List, I did this script to clear data after import (I don’t know is ok ). After its execution levels and label values got lost. Could some explain me to reassign levels again in the script (new depurate value)? Best regard Maicel Monzon MD, PHD Center of Cybernetic Apply to Medicine