R/doubtr.R

Defines functions plot_doubt doubt

#' helps you overcome doubt
#'
#' @param level A number from 1-3 representing your level of doubt in yourself
#'
#' @return A message which tells you to stop doubting
#'
#' @examples
#' doubt(2)
#'
#' @export


doubt <- function(level){
  if (level == 1){
    response <- glue::glue("Why would you doubt yourself?
                          You've overcome more in the past.")
  }
  else if (level == 2){
    response <- glue::glue("Why would you doubt yourself?
                          You have the ability to do what you think you can't.")
  }
  else if (level == 3){
    response <- glue::glue("Why would you doubt yourself?
                          Shakespeare once said, 'Our doubts are traitors, and make us lose the good we oft might win,
                          by fearing to attempt.'")
  }
  return(response)
}

#' Shows you what your future will be like if you doubt yourself
#' @param future A character string representing what you want to know about your future
#' @return A plot which helps you visualize your future
#' @examples
#' plot_doubt("Success")
#' plot_doubt("Wealth")
#' @export

plot_doubt <- function(future){
  plot(x = seq(0,10,.01), y = rev(seq(0,10,.01)),
               xlab = "Amount of Doubt in Yourself", ylab = glue::glue("Future {future}"), main = "This is Scientifically Proven",
               col="red",xlim = c(0,10), ylim = c(0,10))
}
jhavstad8/inspiRe documentation built on May 4, 2022, 2:32 p.m.