Description Usage Arguments Examples
Make an interactive scatter and line plot with long form data.frame
1 2 3 | ggPairLong(data, idvar = "id", variablevar = "variable",
valuevar = "value", colorvar = NULL, idcolor = TRUE,
horizontal = FALSE, interactive = FALSE)
|
data |
a data.frame with a long form |
idvar |
a name of column used as an id variable |
variablevar |
a name of column used as an variable |
valuevar |
a name of column containa a value |
colorvar |
names of column which is assigned as a colour variable |
idcolor |
Logical cvalue. If TRUE, row numbers uses as a color variable |
horizontal |
Logical cvalue. If TRUE, coord_flip() function is used to make a horizontal plot |
interactive |
Logical cvalue. If TRUE, an interactive plot using ggiraph() function will be returned |
1 2 3 4 5 6 7 8 | require(reshape2)
require(ggplot2)
iris$id=1:nrow(iris)
irislong=melt(iris[3:6],id=c("id","Species"))
ggPairLong(irislong,idvar="id",colorvar = "Species")
ggPairLong(irislong,idvar="id",colorvar = "Species",interactive=TRUE)
ggPairLong(irislong,idvar="id",interactive=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.