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

Fread warning #3548

Closed
JBreidaks opened this issue May 7, 2019 · 8 comments
Closed

Fread warning #3548

JBreidaks opened this issue May 7, 2019 · 8 comments
Labels

Comments

@JBreidaks
Copy link

When I run fread first time, I get error,

ff <- fread(paste0("C:/tmp/dataset.csv.gz"),
sep = "|", dec = ".", stringsAsFactors = FALSE,
encoding = "UTF-8")
Registered S3 method overwritten by 'R.oo':
method from
throw.default R.methodsS3

@JBreidaks JBreidaks changed the title https:// Fread warning May 7, 2019
@MichaelChirico
Copy link
Member

please share your sessionInfo() and confirm your error reproduces after running it in an R --vanilla terminal session

@jangorecki
Copy link
Member

it doesn't seems to be related to data.table directly, both packages R.oo and R.methodsS3 are defining same method throw.default resulting a warning
https://cran.r-project.org/web/packages/R.methodsS3/R.methodsS3.pdf
https://cran.r-project.org/web/packages/R.oo/R.oo.pdf
any idea if we can do something with that @HenrikBengtsson

@HenrikBengtsson
Copy link

Confirming. This is not on data.table. It's related to R.oo/R.methodsS3 and is a note that is produced in R (>= 3.6.0). Despite being annoying - it should be a harmless note. I'll investigate how to avoid it, but it'll most likely require a few release cycle of the two, so don't expect anything soon.

@jangorecki
Copy link
Member

Thanks for checking. I think we can then safely close this here.

@geneorama
Copy link

I came here from HenrikBengtsson/R.utils#95

Can @jangorecki (or anyone else) you please explain this warning appears for data.table? data.table imports methods, which is part of core R as far as I can tell, but where is the dependency / invocation of R.oo or R.methodsS3?

@jangorecki
Copy link
Member

jangorecki commented Sep 24, 2019

@geneorama We suggests R.utils (which uses R.oo and R.methodsS3), and just checking if it is available with requireNamespace loads that namespace, thus emit the warning. The same could happen for first, last where we checked xts namespace: #3857

@geneorama
Copy link

@jangorecki Thanks.

It's interesting that CRAN let something happen that introduced this issue. I guess it's because it's not an error or warning, it's just a message. Otherwise I think the checks would have caught it?

For all the inconvenience of the CRAN checks, I would have thought it would prevent this!

Also, it's weird that if I step through the function using debug(requireNamespace) I don't get the warning. I still can't tell what line exactly is causing this message. I was hoping that quiet=TRUE would suppress the message, but from your linked pull request for xtx::First that the quiet option didn't help.

What an annoying problem. I think it makes data.table look a little bad, even though it's not data.table.

@jangorecki
Copy link
Member

@geneorama It is just another example why it make sense to avoid dependencies, even those in Suggests.

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

No branches or pull requests

5 participants