Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

paste function in ggtitle: remove extra spaces

$
0
0

Within the shiny context, how can I remove extra space after and before parentheses in the title of a plot? As shown in the below image, there are redundant spaces between "(" and "6" as well as between "+" and ")".

Also, I was wondering how can I break down the title in such a way that the county name as well as the age group appear in the next line.

enter image description here

Here is my code:

ggtitle(
    paste(
      "Percentage of Population Living with and Responsible for Grandchildren in", 
      input$county_grandpa,
      "(",
      input$Age_Group_grandpa,
     ")"
    ) 
  )

Viewing all articles
Browse latest Browse all 201839

Trending Articles