Closed matt-dray closed 4 months ago
Probably supersedes #15.
{pins} seems a good option for now.
Rhian has pinned a dummy dataset and Quarto doc on Connect (with selected edit and view permissions). The doc reads from the pinned data set like:
board <- pins::board_connect()
animal_crossing_villagers <- pins::pin_read(board, "rhian.davies/animal_crossing_villagers")
Writing/overwriting the pin would be like board |> pins::pin_write()
.
A more bespoke example (untested):
# Create a list, each element is a sheet from the Excel file
xlsx_path <- file.path("data", "file.xlsx")
sheet_names <- readxl::excel_sheets(xlsx_path)
evidence_map_list <- vector("list", length(sheet_names)) |>
purrr::set_names(sheet_names)
for (sheet_name in sheet_names) {
evidence_map_list[[sheet_name]] <- readxl::read_xlsx(xlsx_path, sheet_name)
}
# Write the list object as a pin to the board
board <- pins::board_connect()
board |>
pins::pin_write(
x = evidence_map_list,
name = "nhp_evidence_map", # how to refer to the pin
type = "rds"
)
pins::pin_browse(board, "matt.dray/nhp_evidence_map") # view in browser
pins::pin_read(board, "matt.dray/nhp_evidence_map")
Closed with #65.
Only necessary when v0.1.0 is released and published. Related to #46 and #47.