Skip to content
Prev 178809 / 398506 Next

how to word-wrap text in labels in plots?

Hans Ekbrand wrote:
As the first question has already been answered, you can truncate 
strings like this example from the htmlize function in the prettyR package:

 navitem<-ifelse(nchar(Rcommand)>20,
  paste(paste(unlist(strsplit(Rcommand,""))[1:18],sep="",collapse=""),
   "...",sep="",collapse=""),Rcommand)

Jim