Skip to content

Commit

Permalink
feat: new function get_methods #2 #9
Browse files Browse the repository at this point in the history
  • Loading branch information
atn38 committed Apr 27, 2022
1 parent fc1a7f4 commit 77cc7db
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions R/get_methods.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#' Title
#'
#' @param x
#'
#' @return
#' @export
#'
#' @examples
get_methods <- function(corpus) {
get_multilevel_element(corpus = corpus,
element_names = c("methods", "methodStep"),
parse_function = parse_methodstep)
}

#' Title
#'
#' @param x
#'
#' @return
#'
#' @examples
parse_methodstep <- function(x) {
m <- parse_text(null2na(x$description))
data.frame(methoddescription = m[["text"]],
methodtype = m[["type"]])
}

0 comments on commit 77cc7db

Please sign in to comment.