i'm wondering if ggpairs() function can set fast , flexible pairs() (flexible in terms of coloring, realize user can lot more ggpairs i'm more familiar base r pairs()).
here pairs example using diamonds data set:
diamonds$zcolor <- character(nrow(diamonds)) above <- 0.7 below <- 0.6 diamonds$zcolor[diamonds[['carat']] < below] <- "#e74c3c" diamonds$zcolor[diamonds[['carat']] <= above & diamonds[['carat']] >= below] <- "#f1c40f" diamonds$zcolor[diamonds[['carat']] > above] <- "#2ecc71" pairs(head(diamonds[,1:10], 1800), col = diamonds$zcolor)
essentially, coloring data depending on value of carat. in app i'm working on user can set thresholds(above
& below
) different colors. want have same functionality ggpairs - choose color thresholds based on slider. still, without coloring ggpairs seems render slower regular pairs. there way remedy this?
Comments
Post a Comment