favstats / peRspective

An R wrapper for Conversation AI's Perspective API
https://favstats.github.io/peRspective
Other
53 stars 6 forks source link

Error in prsp_stream - dplyr right_join #6

Closed IanWRichardson closed 3 years ago

IanWRichardson commented 3 years ago

I can't get this error to reproduce, but it has happened with two dates of tweets from a very large dataset of tweets.

I'm passing the status_id of the tweets, which is numeric as the text_id. Converting this to numeric doesn't seem to fix the issue.

Error: Can't join on x$text_id x y$text_id because of incompatible types. i x$text_id is of type >. i y$text_id is of type >. Backtrace: x

  1. +-global::sourceWithProgress(...)
    1. | -base::eval(statements[[idx]], envir = sourceEnv)
  2. | -base::eval(statements[[idx]], envir = sourceEnv)
    1. | -%>%(...) Perspective_processing.R:33:4
    2. +-peRspective::prsp_stream(...)
    3. | -%>%(...)
    4. +-dplyr::right_join(...)
    5. -dplyr:::right_join.data.frame(...)
    6. -dplyr:::join_mutate(...)
    7. -dplyr:::join_rows(x_key, y_key, type = type, na_equal = na_equal)
    8. -base::tryCatch(...)
    9. -base:::tryCatchList(expr, classes, parentenv, handlers)
    10. -base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    11. -value[3L] Warning message: The x argument of as_tibble.matrix() must have unique column names if .name_repair is omitted as of tibble 2.0.0. Using compatibility .name_repair. This warning is displayed once every 8 hours. Call lifecycle::last_warnings() to see where this warning was generated. Execution halted

Thanks

favstats commented 3 years ago

Hi @IanWRichardson!

Have you tried installing the GitHub version? I believe this should fix the issue you are experiencing:

#install.packages("remotes")
remotes::install_github("favstats/peRspective")
favstats commented 3 years ago

The update is now life on CRAN. It should fix the problem for good: https://github.com/favstats/peRspective/releases/tag/v0.1.1