R/number_of_review_pages.R

Defines functions number_of_review_pages

Documented in number_of_review_pages

#' Number of the Review Pages
#'
#' Gives the number of the review pages of any product, by receiving its number of reviews.
#'
#' @param number_of_reviews number. number of the reviews of the product on amazon.it
#'
#' @return numeric. The number of review pages for that product.
#'
#' @examples
#' \dontrun{
#'  number_of_review_pages(6329)
#' }
#'
#' @importFrom magrittr '%>%'
#'
number_of_review_pages <- function(number_of_reviews) {

  number_of_reviews %>% `/`(10) %>% ceiling() %>% return()

}
unimi-dse/adca2d89 documentation built on March 2, 2020, 11:21 a.m.