[R] density plot not smooth

William Dunlap wdunlap at tibco.com
Tue Mar 17 22:06:13 CET 2015


Increasing the value of 'n' given to density will give an estimate at more
points so it will look smoother.  Try n=2^18.

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Tue, Mar 17, 2015 at 12:06 PM, Fix Ace <acefix at rocketmail.com> wrote:

>
>
>  I have a dataset with 6187 elements, ranged from 3 to 104028. When I
> tried to examine only small range of data, I found that the plot was not
> smooth (as shown below):
> plot(density(test$V2), xlim=c(0,1000))
>
>
>  Is there away to make it smoother?
> Thanks a lot!!
>
>
>
>
>
>
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list