0

I have attempted to use ggplot2 and the normal hist() function to display the data required. I messed around with bin widths and number of bins, but I've been getting very similar results to this.

This is my code:

geneCount = read.delim("smc_gene_expression_counts.txt")
geneCount$I98_FBS
geneCount %>% ggplot() + geom_histogram(aes(I98_FBS), binwidth = 500)

Histogram Output:

Histogram Output

Examples of Values in Column Used (I98_FBS) Examples of Values in Column Used (I98_FBS)

stefan
  • 90,330
  • 6
  • 25
  • 51
  • 4
    Welcome to SO! 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., dput(head(x)) or data.frame(...)) directly. If you want to post your data type `dput(NAME_OF_DATASET)` into the console and copy the output starting with `structure(....` into your post. If your dataset has a lot of observations you could do e.g. `dput(head(NAME_OF_DATASET, 10))` for the first ten rows of data. – stefan Nov 23 '22 at 17:29
  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. It's much harder to help if we can't copy/paste the code to run it ourselves to troubleshoot this issue. – MrFlick Nov 23 '22 at 17:42
  • 2
    I suspect your data is in the chart, and drowned out by outliers. I notice tiny bars in the bottom left corner, at (0, 0). Try `binwidth = 10000`. – M.Viking Nov 23 '22 at 17:53

0 Answers0