Tag: superscript

Adding p values and R squared values to a plot using expression()
I was fooling around with including a pvalue and R2 value on a plot I was putting together, and found myself quickly descending into the world of R graphics esoterica. I wanted to be able to include the values on the fly using values extracted from a linear model summary object, and I wanted to…

Modifying basic plots in R
Below is a walkthrough of some of the basics of customizing plots in R. These are all based on the graphics package that comes in the base installation of R. Let’s start by making a basic plot in R. In the code snippets below, green text behind a # sign is considered comments by R,…