Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Missing dataframe in as.db.data.frame error not specific #55

Open
dotcomken opened this issue Nov 15, 2017 · 2 comments
Open

Missing dataframe in as.db.data.frame error not specific #55

dotcomken opened this issue Nov 15, 2017 · 2 comments

Comments

@dotcomken
Copy link

dotcomken commented Nov 15, 2017

The current error as shown in R:

Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘as.db.data.frame’ for signature ‘"function

While debugging the error using as.db.data.frame I learned the dataframe I was using was not in the environment. Would suggest making this error more specific to missing data.

@fmcquillan99
Copy link
Contributor

Thanks, we will update the error message to be clearer.

@orhankislal
Copy link
Contributor

@dotcomken Could you give the steps to repro this issue? I tried a very simple case of missing data frame but it gives a different error.

> n = c(2, 3, 5)
> s = c("aa", "bb", "cc")
> b = c(TRUE, FALSE, TRUE)
> df = data.frame(n, s, b)
> w <- as.db.data.frame(df, "df_from_r", conn_id = 1)
Counting and caching the data table dimension ... 0.009 sec ... done.
An R object pointing to "df_from_r" in connection 1 is created !

The data in the data.frame df is stored into "df_from_r" in database madlib-pg94 on 127.0.0.1 !
> w <- as.db.data.frame(df2, "df_from_r2", conn_id = 1)
Error in as.db.data.frame(df2, "df_from_r2", conn_id = 1) :
  object 'df2' not found

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants