R/plot_request.R

#' A plot requesting function
#'
#' This function allows you to request plots
#' @keywords request
#' @examples
#' plot_request()

plot_request<-function(flag,PC,PR,NCOL,NAME_COL,NROW,NAME_ROW,TITLE,NXL){
  want_graph=readline(prompt="Want graphs? Type y/n:")
  while(flag==TRUE){
    if(want_graph =="y"|want_graph=="Y"){
      makeplot(PC,PR,NCOL,NAME_COL,NROW,NAME_ROW,TITLE,NXL)
      want_graph=readline(prompt="Type y/n:")
    }
    else if (want_graph == "n"|want_graph=="N"){
      print("Thanks for using PCA software!")
      flag=FALSE
    }
    else{
      print("Invalid command")
      plot_request(flag,PC,PR,NCOL,NAME_COL,NROW,NAME_ROW,TITLE,NXL)
      flag=FALSE
    }
  }
}
sq77/PCA7 documentation built on May 15, 2019, 4:49 p.m.