Skip to content

Commit

Permalink
rename summary to jsonSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbeckmann committed Apr 24, 2024
1 parent 6889f01 commit cc2fa97
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions R/summary.R → R/jsonSummary.R
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#' @title JSON summary
#'
#' @description
#' produces a json summary of includes dataset specified by parameter [d].
#' @param d
#' A \code{string} representing the dataset name which json representation should be returned.
#' @return
#' returns a json representation of an included dataset
#' @author
#' @export
#' @examples

jsonSummary <- function(d) {
requireNamespace("jsonlite")

#load the in variable d defined dataset from the package
dat <- checkData(d)

val <-jsonlite::toJSON(lapply(dat, function(x){as.list(summary(x))}), pretty = TRUE, auto_unbox = TRUE)
return(val)

}

#' @title JSON summary
#'
#' @description
#' produces a json summary of includes dataset specified by parameter [d].
#' @param d
#' A \code{string} representing the dataset name which json representation should be returned.
#' @return
#' returns a json representation of an included dataset
#' @author
#' @export
#' @examples

jsonSummary <- function(d) {
requireNamespace("jsonlite")

#load the in variable d defined dataset from the package
dat <- checkData(d)

val <-jsonlite::toJSON(lapply(dat, function(x){as.list(summary(x))}), pretty = TRUE, auto_unbox = TRUE)
return(val)

}

0 comments on commit cc2fa97

Please sign in to comment.