1

Have any of you had this issue before? I am working on using corrplot in R Markdown but when I run the code it seems to through two different visualizations instead of the one that I need. See example and code below.

library(corrplot)
library(corrgram)

df <- read.csv("C:/Users/muribe/Documents/Happiness.csv",row.names = 1)
df <- df[-c(1:3)]
df <- na.omit(df)
df <- corrgram(df)

corrplot(df, method = 'circle',tl.srt = 60)

see chart duplication

  • 1
    Both the `corrgram` and `corrplot` fucntions draw plots. I assume you don't want to see the plot from the `corrgram` function? The function doesn't seem to have an option for that. Might try this trick: https://stackoverflow.com/questions/20363266/how-can-i-suppress-the-creation-of-a-plot-while-calling-a-function-in-r – MrFlick Jul 01 '20 at 03:57
  • 1
    You are actually asking for two plots, `corrgram()` calls the top one, then `corrplot()` creates the second. Try eliminating one of the other... – sconfluentus Jul 01 '20 at 03:59

0 Answers0