
Show HN: Simple Binary Data Visualization in R - tincholio
http://martin.varela.fi/post/simple-binary-data-visualization/
======
rcthompson
For the observation toward the end that compressed files seem highly uniform,
this makes sense intuitively. If there were any visible patterns, that would
imply that the data is further compressible, which would mean the compressor
didn't do it's job very well.

------
lottin
> as.tibble(cbind(x,y,z)) %>% na.omit()

Why on earth would anyone write that instead of
na.omit(as.tibble(cbind(x,y,z)))? Baffles me.

~~~
confounded
Alternatively,

    
    
        x %>%
          bind_cols(y, z) %>%
          as.tibble() %>%
          na.omit()
    

Makes the order of execution a little clearer (and uses more dplyr
conventions). I still nest functions when working interactively with a REPL,
but for code I'll have to reread in the future, the pipes save me much head
scratching. Death to the pyramid of doom.

~~~
minimaxir
For emphasis, bind_cols is a dplyr function (meaning it gets the speed boost
from using Rcpp, albeit not much difference when adding a few columns), while
cbind is a base function which does not.

dplyr nowadays obsoletes most of the basic building blocks of data frame
construction, although they are hidden in the docs.

------
fractal618
thank you for sharing this! i'd like to try and recreate this in R.

~~~
tincholio
Hi, author here. You can use the code in there as a starting point, it's
rather simple!

