From 7e1307b1fe1ad88ceb1968828c39c10bd9ef6ad9 Mon Sep 17 00:00:00 2001 From: Amber Coffman Date: Thu, 1 Dec 2022 14:14:13 -0700 Subject: [PATCH] Add hello world function --- DESCRIPTION | 4 +++- NAMESPACE | 1 + R/hello.R | 12 ++++++++++++ man/hello_world.Rd | 17 +++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 R/hello.R create mode 100644 man/hello_world.Rd diff --git a/DESCRIPTION b/DESCRIPTION index c201fd8..f068b25 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,4 +8,6 @@ Description: What the package does (one paragraph). License: MIT + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.0.0 +RoxygenNote: 7.2.2 +Imports: + glue diff --git a/NAMESPACE b/NAMESPACE index 6ae9268..da44dad 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,2 +1,3 @@ # Generated by roxygen2: do not edit by hand +export(hello_world) diff --git a/R/hello.R b/R/hello.R new file mode 100644 index 0000000..4754792 --- /dev/null +++ b/R/hello.R @@ -0,0 +1,12 @@ +#' Return a friendly message +#' +#' @param world A character vector to whom the message is directed +#' +#' @return A character vector +#' +#' @export +hello_world <- function(world = "World") { + glue::glue("Hello {world}") +} + + diff --git a/man/hello_world.Rd b/man/hello_world.Rd new file mode 100644 index 0000000..7184e46 --- /dev/null +++ b/man/hello_world.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/hello.R +\name{hello_world} +\alias{hello_world} +\title{Return a friendly message} +\usage{ +hello_world(world = "World") +} +\arguments{ +\item{world}{A character vector to whom the message is directed} +} +\value{ +A character vector +} +\description{ +Return a friendly message +}