Closed mmmmtoasty19 closed 1 week ago
Hi @mmmmtoasty19 !
Your issue might be related to another issue, #362 .
A whitespace character does not appear after @export
in the example you have here, so that may not be the issue, but you should double check your real script to see if that is the case.
Sorry, I can’t reproduce this: I saved your code as test.r
and did the following:
box::use(./test)
ls(test)
[1] "retrieve_data" "test_function"
As you can see, both functions are exported.
Error description
The folowing script box can only find the first export function. I have tested this in several ways and am only able to get box to export one function per script
box::use( DBI, RSQLite, here[here], glue[glue], )
' @export
retrieve_data <- function(columns, table) { query <- glue("SELECT {columns} from {table}") con <- DBI$dbConnect( RSQLite$SQLite(), here("app", "synthea.sqlite") ) data <- DBI$dbGetQuery(con, query) DBI$dbDisconnect(con) return(data) }
' @export
test_function <- function() { print("Hello World") }
R version
‘box’ version
‘1.2.0’