Learn R Programming

plothelper (version 0.1.9)

add_slash_n: Adding Slash_n inside Strings

Description

This function simply adds change-line signs inside strings, so that they can be put vertically as the texts of x-axis.

Usage

add_slash_n(x, delete_space = TRUE, vertical_line = TRUE)

Arguments

x

a character vector

delete_space

whether to delete spaces. Default is TRUE.

vertical_line

whether to change - into |. Default is TRUE.

Examples

Run this code
# NOT RUN {
lab=add_slash_n(c("a b-c", "d - ef ", "n"))
# }

Run the code above in your browser using DataLab