This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Defining a big numerical vector in R and making a barplot with it

Hi everybody,

I have a big list of numbers like this (0,0,0,0,0,1,1,1,4,7,7,7,7,7,15,18,18.....17890). What I want is to make a bar graph representing the quantity of each number and get a 0 if there is none. Since Excel doesn't help a lot on this, I planned on using R, define my list as a vector, transform it in a table and use barplot() to get a nice dislay.

FIRST PROBLEM: when I try to define the list as a vector with

> vector=c(0,0,0,0,0,1,1,1,4,7,7,7,7,7,15,18,18.....17890)

R asks for more info, like I am missing something. I think the vector is too big to handle and I don't know what to do. I'm using a 64bit Windows10 with 4GB RAM.

SECOND PROBLEM: I don't know how to make R know that there are no "fives" in my list so it makes the plot stating a "0" in 2, 3, 6, etc. on so it does not look like this: enter image description here

Could I get some help? Thanks!!

r

Hello Ander!

We believe that this post does not fit the main topic of this site.

Not a bioinformatics question.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

Well, you're totally right, not really bioinformatic, sorry for the inconvenience.

0 answers

No answers yet.

Log in to answer this question.