Learn R Programming

ordinalsimr (version 0.2.0)

parse_ratio_text: Parse Ratio Text

Description

This function parses text from ratios which are written in the format of 1-2 digit numbers separated by a colon and trailing with another 1-2 digit number. The text is processed into a numeric vector of length 2 containing the two numbers.

Usage

parse_ratio_text(text)

Value

Numeric vector of length 2

Arguments

text

A string of in the form of e.g. 5:95 or 70:30

Examples

Run this code

parse_ratio_text("70:30")

Run the code above in your browser using DataLab