search for: jvg_dplyr

Displaying 3 results from an estimated 3 matches for "jvg_dplyr".

2016 Oct 27
3
Encontrar la primera columna no NA
...tos que cuesta \n===============================\n" ) beepr::beep(3) # E Primera solucion ------------------------------------------------------ # S comparativa ----------------------------------------------------------- library(microbenchmark) N <- 1e2 tabla <- microbenchmark( JVG_dplyr ={ dat %>% apply( MARGIN = 1, FUN = function(x){ which( !is.na(x) ) %>% min( na.rm = TRUE ) %>% return() } ) }, JVG ={ apply(X = dat, MARGIN = 1, FUN = function(x){...
2016 Oct 27
2
Encontrar la primera columna no NA
...tos que cuesta \n===============================\n" ) beepr::beep(3) # E Primera solucion ------------------------------------------------------ # S comparativa ----------------------------------------------------------- library(microbenchmark) N <- 1e2 tabla <- microbenchmark( JVG_dplyr ={ dat %>% apply( MARGIN = 1, FUN = function(x){ which( !is.na(x) ) %>% min( na.rm = TRUE ) %>% return() } ) }, JVG ={ apply(X = dat, MARGIN = 1, FUN = function(x){...
2016 Oct 27
4
Encontrar la primera columna no NA
...ect.org> Enviado: Thu, 27 Oct 2016 17:17:12 +0200 (CEST) Asunto: Re: [R-es] Encontrar la primera columna no NA Hemos mejorado bastante desde el inicio. Pero aun andamos lejos. Igual es por el merge que hago. Seguire mirando library(microbenchmark) N <- 1e1 tabla <- microbenchmark( # JVG_dplyr ={ # dat %>% # apply( MARGIN = 1, FUN = # function(x){ # which( !is.na(x) ) %>% min( na.rm = TRUE ) %>% return() # } # ) # dat[ , First_month := First_month] # N_for <- length( unique(First_month...