I'm trying to put together a ggpairs visualization that uses the first column from a dataframe to specify the point colors, and columns 4-7 of the dataframe to create the point distributions:
require(GGally)
require(ggplot2)
df <- read.table('https://gist.githubusercontent.com/duhaime/46dde948263136d0b52be1575232a83e/raw/80f14650e4f4b9ef38a5dec3f5bbb8c62954ee59/match-stats.tsv',
sep='\t',
colClasses=c(
rep('character', 3),
rep('numeric', 4)
)
)
ggpairs(df, aes(colour = V1, alpha = 0.4),
columns= 4:7 )
However, this throws:
Error in
colnames<-
(*tmp*
, value = c("V1", "ggally_cor")) :
'names' attribute [2] must be the same length as the vector [1]
Does anyone know how to resolve this and achieve the plot described above? Any help would be greatly appreciated!