Learn R Programming

NHSDataDictionaRy (version 1.2.5)

right_xl: right_xl function

Description

This function replicates the RIGHT function in Excel and is utilised for right trimming of character strings.

Usage

right_xl(text, num_char = 0)

Arguments

text

The text you want to RIGHT trim

num_char

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

Value

The trimmed string from the text parameter and trimming by the number of characters num_char passed to the parameter.

Details

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

Examples

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

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

Run the code above in your browser using DataLab