dplyr - Best practices to comment R pipeline %>% -


when writing long pipelines r , dplyr/tidyr, has found way add comments?

i know function syntax pretty expressive, multiple actions "grouped" , wonder if better break whole thing in multiple pipelines comments between them or if there way nicely format comments within pipeline.

not answer, long comment--

i put comments in between commands in pipe. example:

object %>%   command1 %>%    #* comment    command2 %>%   command3 %>%    #* perhaps    #* long   #* comment    command4 

the key, me, indenting comment same level code discusses can visualize part of single block.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -