methylKit icon indicating copy to clipboard operation
methylKit copied to clipboard

formatting README.md chunk codes with Google's R Style Guide

Open MarcinKosinski opened this issue 7 years ago • 2 comments

There are some code conventions used to write a human-readable code. There exist a Google's R Style Guide - https://google.github.io/styleguide/Rguide.xml which is one of the most popular in the R community.

I am providing a PR with a fixed code formatting in README.md as I must admit the code made my eyes bleeding. This doesn't mean your package is not cool - I really admire your effort.

In the future you can use: formatR http://yihui.name/formatR/ package to fix code formatting in your whole R directory - for all *.R files at the same time :)

PS. I am going through the vignette and I think I will provide the same PR for the vignette.

MarcinKosinski avatar Oct 31 '16 13:10 MarcinKosinski

Hi Marcin, I don't follow google's R style guide, and probably will not follow it in the future. Unless Bioconductor demands that I use it, I will not change these. But many thanks for the PR

al2na avatar Oct 31 '16 13:10 al2na

I have done this for you, so you don't have to bother. I have done this for future users, not for Biocondcutor :) as I believe you have done this great tool for people and not for the platform.

It was easy to do with few calls of the formatR package and similar tools.

I am providing extra commit with a vignette formatting. I believe it will be easier to read for users right now.

I have also extended some knitr options and I have added a custom css for the vignette width. If now displayed in the browser, it will use more space, as it's width is extended automatically to 90% of the browser's width.

Talking about code formatting in R directory for the source of functions - this is rather seen only by creator and collaborators so if you don't like then leave it as is, if this is your style.

Once again thanks for a great tool! If you are not convinced of benefits from this PR, then feel free to close without merging.

MarcinKosinski avatar Oct 31 '16 14:10 MarcinKosinski