Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

format_code

Format code with one or multiple terms


Description

Take a value like "a + b" and (1) replace it with NA if na_col == NA. (2) Change to "(a + b)" if there is a "+" (3) Return itself otherwise, e.g., "a" –> "a".

Usage

format_code(col, na_col)

Arguments

col

A column

na_col

If this column is NA, return NA

Value

string

Author(s)

Jonas Kristoffer Lindeløv jonas@lindeloev.dk


mcp

Regression with Multiple Change Points

v0.3.0
GPL-2
Authors
Jonas Kristoffer Lindeløv [aut, cre] (<https://orcid.org/0000-0003-4565-0595>)
Initial release
2020-07-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.