Skip to content

Commit

Permalink
Merge branch 'development' of github.com:leibniz-psychology/FEARBASE-…
Browse files Browse the repository at this point in the history
…R-Package into development
  • Loading branch information
Rostu committed Apr 24, 2024
2 parents fd43051 + cc2fa97 commit 77d2637
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
/.idea/
.Rproj.user
.Rhistory
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ importFrom("stats", "as.formula", "pnorm", "predict", "qnorm")
importFrom("utils", "str")

export(jsonSummary)
export(checkData)
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)

}

Binary file modified data/randomData.RData
Binary file not shown.
Binary file removed randomData.RData
Binary file not shown.

0 comments on commit 77d2637

Please sign in to comment.