Skip to content

Commit

Permalink
Added examples and returns in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nbruder committed May 17, 2024
1 parent 8010c3e commit 24dc0f8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions R/MetaNLP.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ setClass("MetaNLP", representation(data_frame = "data.frame"))
#' values are either "yes" and "no" or "include" and "exclude" or "maybe".
#' The value "maybe" is handled as a "yes"/"include".
#'
#' @examples
#' \dontrun{
#' obj <- MetaNLP("test_data.csv")}
#'
#' @note
#' To ensure correct processing of the data when there are special characters
#' (e.g. "é" or "ü"), make sure that the csv-file is correctly encoded
Expand Down Expand Up @@ -169,6 +173,7 @@ setMethod("show", signature("MetaNLP"),
#' obj <- MetaNLP("test_data.csv")
#' plot(obj)}
#'
#' @return nothing
#' @export
setMethod("plot", signature("MetaNLP", y = "missing"),
function(x, y = NULL, max.words = 70,
Expand Down
3 changes: 3 additions & 0 deletions R/useful_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ setGeneric("write_csv", function(object, ...) {
#' write_csv(obj2, path = "foo.csv")
#' }
#'
#' @return nothing
#'
#' @rdname write_csv
#' @export
Expand Down Expand Up @@ -167,6 +168,8 @@ setMethod("write_csv", signature("MetaNLP"),
#' to_test_obj <- read_test_data(obj, "path/to_test.csv")
#' }
#'
#' @return An object of class MetaNLP
#'
#' @rdname read_test_data
#' @export
setGeneric("read_test_data", function(object, ...) {
Expand Down
5 changes: 5 additions & 0 deletions man/MetaNLP.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/plot-MetaNLP-missing-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/read_test_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/write_csv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 24dc0f8

Please sign in to comment.