R/ScoreDensity.R

Defines functions ScoreDensity

Documented in ScoreDensity

#' Score Density
#'
#' This function reads the data into the dataframe and calculates how many times occur a certain score
#' @return plot of the Score density
#' @export
#' @importFrom plotly plot_ly
#'
ScoreDensity <- function(){

  DfDSE <- gradecalculator::mydata
  tabella <- table(DfDSE$Score)

  Density <- as.vector(tabella)
  Scores <- names(tabella)

  p <- plot_ly(ggplot2::diamonds, y = ~Density, color = ~Scores, type = "box")

  return(p)

}
unimi-dse/c34a5d0e documentation built on Feb. 16, 2020, 5:45 a.m.