SixiangHu / DataMan

R package for data cleaning, preliminary data analysis and modeling assessing with visualisation.
3 stars 0 forks source link

axis not in order when numGroupNum used in dataPlot #40

Closed SixiangHu closed 6 years ago

SixiangHu commented 8 years ago

The issue occurs when newGroupNum used with byvar. When there is no data for certain x levels in a certian byvar level, the order of the x level is not as expected.

SixiangHu commented 6 years ago

Found no such issue under v0.6.2

dt = data.frame(mile = as.integer(seq(0,8000,10)), res = runif(length(seq(0,8000,10))), by = sample(c("1","2"),801,replace = TRUE), stringsAsFactors = FALSE)

dataPlot2(dt$mile,dt$res,by=dt$by)

dataPlot2(dt$mile,dt$res,by=dt$by,breaks=seq(0,8000,1000),newGroupNum=20)