1

When plotting column headers is there a way to break the text so it appears in two rows?

x <- runif(n = 15, min = 1, 10)
y <- runif(n = 15, min = 1, 10)
z <- runif(n = 15, min = 1, 10)
w <- runif(n = 15, min = 1, 10)
k <- runif(n = 15, min = 1, 10)


df_exemplo <- data.frame(x, y, z, w, k)
colnames(df_exemplo) <- c("Previsto ARIMA", "Previsto Holtwinters", "Observado", "Erro ARIMA (%)", "Erro Holtwinters (%)")

Example:

From

Previsto Arima | Previsto Holtwinters

To

Example

RafaelB
  • 13
  • 4
  • Can you clarify what you mean by plotting column headers? If you `View(df_exemplo)` in RStudio, the Viewer does wrap the text. If you want to manually have line breaks, you can use the `\n` as part of the name to have a new line. The answer at https://stackoverflow.com/questions/9317830/r-do-i-need-to-add-explicit-new-line-character-with-print might be relevant to you. – Kerry Jackson Jul 11 '18 at 18:56

0 Answers0