Off topic:Defining a big numerical vector in R and making a barplot with it
0
0
Entering edit mode
6.9 years ago
Ander ▴ 50

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 • 884 views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2771 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6