Learn R Programming

tergo (version 0.1.9)

get_default_config: Get the default configuration

Description

This configuration is used by the styling functions if no value is provided for the configuration keys. It can also serve as the base for you custom configuration.

Usage

get_default_config()

Arguments

Value

list with the default configuration

Details

The configuration values:

  • indent - the number of spaces to use for indentation.

  • line_length - the maximum number of characters in a line.

  • embracing_op_no_nl - whether to allow a newline after an embracing operator.

  • allow_nl_after_assignment - whether to allow a newline after an assignment operator.

  • space_before_complex_rhs_in_formula - whether to add a space before a complex right-hand side in a formula.

  • strip_suffix_whitespace_in_function_defs - whether to strip suffix whitespace in function definitions.

  • function_line_breaks - the type of line breaks in function definitions when arguments do not fit. Possible values are: hanging, double, single.

  • insert_newline_in_quote_call - whether to insert a newline in calls to quote.

Examples

Run this code
config <- get_default_config()
print(config)

# Make the indent 4 spaces
config$indent <- 4L

# Make the maximum line length 80 characters
config$line_length <- 80L

# Make the function line breaks double
config$function_line_breaks <- "double"

Run the code above in your browser using DataLab