Не удается получить правильные участки в окне сюжета. Один участок отсутствует. Может кто-нибудь сказать, почему? - PullRequest
0 голосов
/ 20 апреля 2020

Я использую функцию par(), чтобы разделить окно, чтобы разместить три графика, но всегда отсутствует один график. Не в состоянии понять, почему это происходит. Ниже моя функция скрипта R:

answer_3<-function(){

  set.seed(1)
  a <- runif(100)
  set.seed(1)
  b <- runif(100)
  A<- as.data.frame(A) 
  B <- as.data.frame(b) 
  AB<-cbind(A,B)
  AB_pear<-cor(x = AB,y=NULL,method = "pearson")
  AB_spear<-cor(x = AB,y=NULL,method = "spearman")
  AB_kend<-cor(x = AB,y=NULL,method = "kendall")
  par(mfcol=c(3,1), mar=c(1,1,1,1))
  #sp <-plot(AB[,1],AB[,2],main = "Plot of random uniform distribution",xlab = "uniformly distributed points_a",ylab = "uniformly distributed points_b")
  library(corrplot)
  Pear_p<-corrplot(corr = AB_pear,method = "circle",title = "Pearson correlogram")
  Spear_p<-corrplot(corr = AB_spear,method = "circle",title = "Spearman correlogram")
  Kend_p<-corrplot(corr = AB_kendall,method = "circle",title = "Kendall correlogram")


  c(Pear_p,Spear_p,Kend_p)
}

Kend_p всегда отсутствует в окне графика. Что я делаю не так?

...