Learn R Programming

NHSDataDictionaRy (version 1.2.5)

mid_xl: mid_xl function

Description

This function replicates the MID function in Excel and is utilised for left trimming of character strings.

Usage

mid_xl(text, start_num = 1, num_char = 0)

Arguments

text

The text you want to MID trim

start_num

The start number to start the trim. This needs to be numeric.

num_char

The number of characters your want to trim by. This field needs to be numeric.

Value

The extracted text between the start_num and the num_char to produce a sub string result.

Details

This has been included as a convenience function for working with text and string data.

Examples

Run this code
# NOT RUN {
mid_xl(text= "This is some example text", start_num = 6, num_char = 10)

# }
# NOT RUN {
mid_xl(text= "This is some example text", start_num = 6, num_char = 10)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab