Error: Columns `x`, `y` must be 1d atomic vectors or lists

I actually don't recommend using that notation for ggplot2, I was just trying to illustrate why you can't use the single bracket subset for passing columns as vectors.

The way you use reprex is around the code that you run— please take a minute to look at either the FAQ, or the quick demo of reprex in the webinar:

Since you haven't assigned your tidied dataframe to anything, there's a disconnect between what shows up when you're running Spectral %>% tidyr::gather("id", "value", 2:638), and the data frame you're passing in to ggplot, which is presumably in whatever format Spectral was in pre-tidying.

1 Like