Infers a schema from an R data.frame or tibble and creates a corresponding
NODE table in the Ladybug database.
Examples
if (FALSE) { # \dontrun{
conn <- lb_connection(":memory:")
my_df <- data.frame(
name = c("Alice", "Bob"),
age = c(25L, 30L),
height = c(1.75, 1.80),
is_student = c(TRUE, FALSE),
birth_date = as.Date(c("1999-01-01", "1994-05-15"))
)
lb_create_table_from_df(conn, my_df, "Person", primary_key = "name")
# Now you can load data into the created table
lb_copy_from_df(conn, my_df, "Person")
result <- lb_execute(conn, "MATCH (p:Person) RETURN *")
print(as.data.frame(result))
} # }
