format_contract: Format contract number

View source: R/format_contract_num.R

format_contractR Documentation

Format contract number

Description

format_contract() takes in a single contract number and returns a consistently-formatted contract number, according to user controls for the output.

Usage

format_contract(contract, hyphenated = TRUE, master_only = FALSE)

Arguments

contract

Character string, contract number.

hyphenated, master_only

Logical, options for controlling the output. master_only returns only the parent contract.

Value

A character string in the specified format.

Examples

# control the output with the two logical parameters
format_contract("FA8616-14-D-6060:0001",
                hyphenated = TRUE,
                master_only = FALSE)
format_contract("FA8620-15-G-4040-0039",
                hyphenated = TRUE,
                master_only = TRUE)
format_contract("FA8620-15-G-4040-FA8620-15-F-4040",
                hyphenated = FALSE,
                master_only = TRUE)
format_contract("FA862015C4040",
                hyphenated = FALSE,
                master_only = FALSE)


Technomics/costmisc documentation built on Nov. 12, 2024, 8:05 a.m.