ggplot2 - argument "env" is missing, with no default qplot or ggplot R -


i have dataset 3 columns i'm trying plot pdf column id. here's part of data looks like.

        day          id   count         8754     48112050     1         8975     48112050     3         8327     61010046     2         8346     61010046  3997         8506     61010046     1         8605     61010046     1 

i use qplot :

qplot(count, colour=factor(id), data=df, geom="density") 

or ggplot:

ggplot(df, aes(x=count, colour= id))+geom_density() 

but not plot pdf ids. when dig in, realize ids have no more 2 occurrences in data missing in plot produced qplot or ggplot. in example, id:48112050.

i plot density id only, , works.

         day          id   count         8754     48112050     1         8975     48112050     3 

however, when limit df include id, or id 2 occurrences, qplot or ggplot gives me following error:

error in exists(name, envir = env, mode = mode) :  argument "env" missing, no default 

does mean qplot/ggplot needs @ least 3 points plot density function?

it looks ggplot2_1.0.1 require @ least 3 points estimate density. however, behavior appears have changed in github repository this commit on jun 12,2015. there version that's on cran published in march. i'm not sure when expect next release of ggplot2. try pulling source directly github if behavior essential you,


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -