Skip to content

Box only exporting one function per script #367

Closed
@mmmmtoasty19

Description

@mmmmtoasty19

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

platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          4                           
minor          3.3                         
year           2024                        
month          02                          
day            29                          
svn rev        86002                       
language       R                           
version.string R version 4.3.3 (2024-02-29)
nickname       Angel Food Cake

‘box’ version

‘1.2.0’

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions