R/hello.R

#' Prints "Hello, world!"
#'
#' \code{hello} prints "Hello, world!" to the console.
#'
#' @param n Integer
#'
#' @return nothing
#'
#' @section Section:
#' This paragraph is under an arbitrary section heading to split it up from the other details.
#' @examples
#' hello(3)
#' @family greeting functions
#' @seealso \code{\link{nihao}} for Chinese greeting

hello <- function(n=1) {
  for (i in seq(n)){
    print("Hello, world!")
  }
}

#' Prints "你好,世界!"
#'
#' \code{nihao} prints "Hello, world!" in Chinese.
#'
#' @family greeting functions
#' @inheritParams hello
#' @seealso \code{\link{hello}} for English version
#' @seealso and \href{https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=nihao}{你好-MDBG} for dictionary entry
nihao <- function(n=1) {
  for (i in seq(n)) {
    print("你好,世界!")
  }
}
nzxwang/ankitools documentation built on May 12, 2019, 4:10 p.m.