Re: [R] Plotting 15 million points

2010-02-25 Thread Abhishek Pratap
Hi All

I should have included this first up and I think I understand the
problem. The load on the server I was running R was  heavy which was
causing everything to slow up.

>summary(s)
   Min. 1st Qu.  MedianMean 3rd Qu.Max.
  2 182 2636086 343 463
> length(s)
[1] 16750589

hist(log(s,10),breaks=100)

Thanks!
-Abhi


On Thu, Feb 25, 2010 at 7:38 PM, Nordlund, Dan (DSHS/RDA)
 wrote:
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
>> Behalf Of Abhishek Pratap
>> Sent: Thursday, February 25, 2010 3:12 PM
>> To: r-help@r-project.org
>> Subject: [R] Plotting 15 million points
>>
>> Hi All
>>
>> I have a vector of about 15 million numbers which I would like to
>> plot. The goal is the see the distribution.  I tired the usual steps.
>>
>> 1. Histogram : never gets complete my window freezes w/out log base 10
>> 2. Density  : I first calculated the kernel density and then plotted
>> it which worked.
>>
>> It would be nice to superimpose histogram with density but as of now I
>> am not able to get this data as a histogram. I tried ggplot2 which
>> also hangs.
>>
>> Any efficient methods to play with > 10 million numbers in a vector.
>>
>> Thanks,
>> -Abhi
>>
>
> You need to show us what you did.  Generating 15 million random normals and 
> plotting a histogram worked just fine on my desktop in a matter of ~6 seconds.
>
>> x <- rnorm(15e6)
>> hist(x)
>
> Dan
>
> Daniel J. Nordlund
> Washington State Department of Social and Health Services
> Planning, Performance, and Accountability
> Research and Data Analysis Division
> Olympia, WA  98504-5204
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Plotting 15 million points

2010-02-25 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Abhishek Pratap
> Sent: Thursday, February 25, 2010 3:12 PM
> To: r-help@r-project.org
> Subject: [R] Plotting 15 million points
> 
> Hi All
> 
> I have a vector of about 15 million numbers which I would like to
> plot. The goal is the see the distribution.  I tired the usual steps.
> 
> 1. Histogram : never gets complete my window freezes w/out log base 10
> 2. Density  : I first calculated the kernel density and then plotted
> it which worked.
> 
> It would be nice to superimpose histogram with density but as of now I
> am not able to get this data as a histogram. I tried ggplot2 which
> also hangs.
> 
> Any efficient methods to play with > 10 million numbers in a vector.
> 
> Thanks,
> -Abhi
> 

You need to show us what you did.  Generating 15 million random normals and 
plotting a histogram worked just fine on my desktop in a matter of ~6 seconds.

> x <- rnorm(15e6)
> hist(x)

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA  98504-5204

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Plotting 15 million points

2010-02-25 Thread David Winsemius


On Feb 25, 2010, at 6:11 PM, Abhishek Pratap wrote:


Hi All

I have a vector of about 15 million numbers which I would like to
plot. The goal is the see the distribution.



 I tired the usual steps.


I get that way after a long day myself.



1. Histogram : never gets complete my window freezes w/out log base 10


What expressions?


2. Density  : I first calculated the kernel density and then plotted
it which worked.

It would be nice to superimpose histogram with density but as of now I
am not able to get this data as a histogram.


?cut
?table



I tried ggplot2 which
also hangs.

Any efficient methods to play with > 10 million numbers in a vector.


Well, I only have 4.5 million rows (in a hundred plus variable  
dataframe) but the typical commands seem to work fine. hist() gave a  
plot almost instantly:


hist(TRdta$ur_procreat, breaks=c(seq(0, 4, by=0.2), 20)  )



Thanks,
-Abhi

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Plotting 15 million points

2010-02-25 Thread Glover, Tim
Have you considered taking a random subset and plotting that?  I'd bet you can 
get a really impression of the distribution with a few hundred thousand points 
at most.

Tim Glover 
Senior Environmental Scientist - Geochemistry 
Geoscience Department Atlanta Area 
MACTEC Engineering and Consulting, Inc. 
Kennesaw, Georgia, USA 
Office 770-421-3310 
Fax 770-421-3486 
Email ntglo...@mactec.com 
Web www.mactec.com 
 


-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of Abhishek Pratap
Sent: Thursday, February 25, 2010 6:12 PM
To: r-help@r-project.org
Subject: [R] Plotting 15 million points

Hi All

I have a vector of about 15 million numbers which I would like to
plot. The goal is the see the distribution.  I tired the usual steps.

1. Histogram : never gets complete my window freezes w/out log base 10
2. Density  : I first calculated the kernel density and then plotted
it which worked.

It would be nice to superimpose histogram with density but as of now I
am not able to get this data as a histogram. I tried ggplot2 which
also hangs.

Any efficient methods to play with > 10 million numbers in a vector.

Thanks,
-Abhi

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Plotting 15 million points

2010-02-25 Thread Liviu Andronic
On 2/25/10, Abhishek Pratap  wrote:
>  Any efficient methods to play with > 10 million numbers in a vector.
>
Did you try rggobi?
Liviu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Plotting 15 million points

2010-02-25 Thread Abhishek Pratap
Hi All

I have a vector of about 15 million numbers which I would like to
plot. The goal is the see the distribution.  I tired the usual steps.

1. Histogram : never gets complete my window freezes w/out log base 10
2. Density  : I first calculated the kernel density and then plotted
it which worked.

It would be nice to superimpose histogram with density but as of now I
am not able to get this data as a histogram. I tried ggplot2 which
also hangs.

Any efficient methods to play with > 10 million numbers in a vector.

Thanks,
-Abhi

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.