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

Failing tests on R 3.3.0 #1806

Closed
krlmlr opened this issue May 9, 2016 · 3 comments
Closed

Failing tests on R 3.3.0 #1806

krlmlr opened this issue May 9, 2016 · 3 comments

Comments

@krlmlr
Copy link
Member

krlmlr commented May 9, 2016

See #1507 (comment) and references.

I think the problem boils down to:

> match("l\u00f8penummer", iconv(  "l\u00f8penummer", to  = "latin1" ))
[1] NA
> match(iconv(  "l\u00f8penummer", to  = "latin1" ), "l\u00f8penummer")
[1] NA

I'm taking a closer look.

@krlmlr
Copy link
Member Author

krlmlr commented May 9, 2016

Looks like this problem was introduced in R 3.3.0 -- I'm seeing the same problem here. NB: I think the code used in the tests need to be changed anyway.

> match("l\u00f8penummer", iconv(  "l\u00f8penummer", to  = "latin1" ))
[1] NA
> match(iconv(  "l\u00f8penummer", to  = "latin1" ), "l\u00f8penummer")
[1] NA

I haven't found anything in the NEWS about it, is this a true regression?

@krlmlr krlmlr changed the title Failing tests on Ubuntu 15.10 Failing tests on R 3.3.0 May 9, 2016
@krlmlr
Copy link
Member Author

krlmlr commented May 9, 2016

Unfortunately, yes:

> match(iconv(  c("A", "l\u00f8penummer"), from = "UTF8", to  = "latin1" ), "l\u00f8penummer")
[1] NA  1
> match(iconv(  c("l\u00f8penummer"), from = "UTF8", to  = "latin1" ), "l\u00f8penummer")
[1] NA

This might be related to

match(x, table) is faster (sometimes by an order of magnitude) when x is of length one and incomparables is unchanged (PR#16491).

Posted to R-devel.

@yutannihilation
Copy link
Member

FYI: the bug is reported below and the fix is already committed.

16885 – bug in match (I think it's related to PR#16491)
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16885

@hadley hadley closed this as completed May 26, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 2018
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