Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming conflict for class 'text' #1

Closed
jeroen opened this issue May 24, 2017 · 7 comments
Closed

Naming conflict for class 'text' #1

jeroen opened this issue May 24, 2017 · 7 comments

Comments

@jeroen
Copy link

jeroen commented May 24, 2017

The new $.text methods introduced in 0.5.0 has created a conflict with ggplot2. It seem to trigger the very unfortunately named grid:::validDetails.text.

library(corpus)
library(ggplot2)
ggplot(cars, aes(x = speed)) + geom_bar()
# Error in `$.text`(x, "label") : $ operator is invalid for text objects

Not sure if this is a bug in ggplot2 or corpus. @hadley.

@patperry
Copy link
Owner

Thanks for the heads up. This seems like a bug in ggplot2, but maybe it's best if I work around it by renaming the class to corpus_text. (p.s. this issue really belongs on https://github.com/patperry/r-corpus , not here)

@patperry
Copy link
Owner

Also, it's weird that this didn't show up before; the $.text method was there in version 0.4.0. I think the problem has to do with corpus importing Matrix, which imports grid. (Version 0.4.0 did not import or use anything from Matrix.)

@jeroen
Copy link
Author

jeroen commented May 24, 2017

I think it gets triggered because you added S3method($, text) to the NAMESPACE.

@patperry
Copy link
Owner

Fixed now: patperry/r-corpus@3d9f299 . I'll submit a new version to CRAN (0.5.1).

@jeroen
Copy link
Author

jeroen commented May 24, 2017

Maybe try running the benchmark.Rmd script before submitting.

@patperry
Copy link
Owner

Great suggestion. I'll make sure everything runs smoothly before I submit.

@patperry
Copy link
Owner

Just submitted version 0.5.1 to CRAN. Benchmarks runs smoothly now (slightly faster read time, and faster manipulation times). No need for the "as.character" call in the last benchmark any more.

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

No branches or pull requests

2 participants