Skip to contents

This function initializes a connection to a specified database and copies user data to a predefined table in the database.

Usage

init_and_copy_to_db(database, user_data)

Arguments

database

The path or name of the SQLite database to connect to.

user_data

A dataframe containing the user data to be copied to the database.

Value

A connection object representing the active database connection.

Examples

if (FALSE) { # \dontrun{
  database_path <- Sys.getenv("DB_PATH")
  user_df <- data.frame(id = 1:3, name = c("Alice", "Bob", "Charlie"))
  conn <- init_and_copy_to_db(database_path, user_df)
} # }