ConvertSpacesToTabs: Replace leading spaces in code files with tabs

Description Usage Arguments Details Value

Description

Format code by replacing leading spaces with tabs to allow for block indentation

Usage

1

Arguments

x

A string containing source code

Details

For proper code generation, code that is autogenerated must be available for debugging when required.

To allow for this requirement, most of the code has to be indented in a format that the IDE in use would have indented it if it was written manually.

For this, spaces have to be tabbed as required by RStudio, our editor of choice (bias!!).

This utility function is used to format any custom code for the IDE and is purely for aesthetic purposes.

Value

Properly indented source code


Maglado/redcapdata_p documentation built on May 26, 2019, 4:37 p.m.