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

Comments

Projects
None yet
2 participants
@jeroen

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

This comment has been minimized.

Show comment
Hide comment
@patperry

patperry May 24, 2017

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)

Owner

patperry commented May 24, 2017

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

This comment has been minimized.

Show comment
Hide comment
@patperry

patperry May 24, 2017

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.)

Owner

patperry commented May 24, 2017

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

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen May 24, 2017

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

jeroen commented May 24, 2017

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

@patperry

This comment has been minimized.

Show comment
Hide comment
@patperry

patperry May 24, 2017

Owner

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

Owner

patperry commented May 24, 2017

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

@patperry patperry closed this May 24, 2017

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen May 24, 2017

Maybe try running the benchmark.Rmd script before submitting.

jeroen commented May 24, 2017

Maybe try running the benchmark.Rmd script before submitting.

@patperry

This comment has been minimized.

Show comment
Hide comment
@patperry

patperry May 24, 2017

Owner

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

Owner

patperry commented May 24, 2017

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

@patperry

This comment has been minimized.

Show comment
Hide comment
@patperry

patperry May 25, 2017

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.

Owner

patperry commented May 25, 2017

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