source_conn_helpers {diseasystore}R Documentation

File path helper for different source_conn

Description

Usage

source_conn_path(source_conn, file)

source_conn_github(source_conn, file, pull = TRUE)

Arguments

source_conn

(character(1))
File location (path or URL).

file

(character(1))
Name (including path) of the file at the location.

pull

(logical(1))
Should "git pull" be called on the local repository before reading files?

Value

(character(1))
The full path to the requested file.

Examples

  # Simulating a data directory
  source_conn <- "data_dir"
  dir.create(source_conn)
  write.csv(mtcars, file.path(source_conn, "mtcars.csv"))
  write.csv(iris, file.path(source_conn, "iris.csv"))

  # Get file path for mtcars.csv
  source_conn_path(source_conn, "mtcars.csv")

  # Clean up
  unlink(source_conn, recursive = TRUE)

[Package diseasystore version 0.2.2 Index]