Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jimrothstein committed Jan 19, 2025
1 parent fc923f7 commit d686da2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions BOX/01_simple_box.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
box::use(
tibble,
mod/hello
)
hello$hello("jim")

options('box.path')

day = date()
log = function (msg) {
box::use(glue[glue])
# We can now use `glue` inside the function:
message(glue('{day}-[LOG MESSAGE] {msg}'))
}

log('test')
20 changes: 20 additions & 0 deletions BOX/mod/hello.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Box module
# mod/hello.R

# USAGE:

# box::use(
# tibble,
# mod/hello # no .R extension
# )
# hello$hello("jim")

#' @export
hello = function (name) {
message('Hello, ', name, '!')
}

#' @export
bye = function (name) {
message('Goodbye ', name, '!')
}

0 comments on commit d686da2

Please sign in to comment.