Skip to content

Style Guidelines

PhilippBach edited this page Nov 23, 2021 · 6 revisions

Style Guidelines

Use styler "mlr-style"

So far there's not yet a styler customized to DoubleML. Currently, we stick to the "mlr-style" used by mlr3.

Workflow:

remotes::install_github("pat-s/styler@mlr-style")
  • Once you are done with your changes, run the call
styler::style_pkg(style = styler::mlr_style)

(applied to entire package) or

styler::style_file(<file>, style = styler::mlr_style)

(applied to a specific file).

  • Check your code with the lintr package using the call lintr::lint(<file>) or lintr::lint_package().

General Guidelines

1. Imported packages

Generally, do not use :: to refer to imported packages. Only use :: for suggested packages or if function names are not unique.

Notes

Note: DoubleML is still at a fairly early stage of development. This styleguide will therefore be up do changes and is still open for discussion.

Acknowledgement: We would like to thank the developers of mlr3 for setting up the "mlr3-style" and their helpful style guide.

Clone this wiki locally