0

Using ggplots to create boxplotscombining data from two columns into one

The sample data I am using has two columns (AgeAtDeath and Sample_ID) which contain the variables I need to plot. I combined these two columns. I had already managed to create a boxplot with ggplot using the variables from only Sample_ID by way of subsetting the data into 'AD', 'Control', and 'Resilient'. When I added the fourth variable 'Exact90' from the merged columns, the code ran, showing that there were no errors, but there was no boxplot displayed for the 'Exact90' data? What could I do next?

  • Please provide enough code so others can better understand or reproduce the problem. – Community May 04 '23 at 18:51
  • 1
    Welcome to SO! It would be easier to help you if you provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) including a snippet of your data or some fake data. Please do not post an image of code/data/errors [for these reasons](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question/285557#285557). Just include the code, console output, or data (e.g. using `dput(...)` or `data.frame(...)`) directly. – stefan May 04 '23 at 18:57

0 Answers0