0

I would like to add a title to my stem leaf diagram in basic R but how? Im am using the Palmerpenguins package and library palmerpenguins. I already tried main= "" but it doesnt work?

stem (flipper_length_mm, scale = 1)
NoobKim
  • 21
  • 6
  • You can out out the results of stem to a plot window: https://stackoverflow.com/questions/26532564/how-to-output-a-stem-and-leaf-plot-as-a-plot . Then just an a `title("your title")` – user20650 Apr 28 '21 at 10:32
  • I really don't understand. I am a beginner in R. – NoobKim Apr 28 '21 at 11:08
  • `stem` outputs the plot in the terminal. And so you can't really add a title to it. One way around this is to send the output from `stem` to an actual plot window, as done in the link. You can then add a title. (So using the code form the link use `plot.new(); tmp <- capture.output(stem(iris$Petal.Length)) ; text( 0,1, paste(tmp, collapse='\n'), adj=c(0,1), family='mono' ) ; title("your title")`) – user20650 Apr 28 '21 at 11:12

0 Answers0