Bug 16909 - [<-.data.frame fails with accentuated columns names (it creates a new variable)
Summary: [<-.data.frame fails with accentuated columns names (it creates a new variable)
Status: CLOSED DUPLICATE of bug 16885
Alias: None
Product: R
Classification: Unclassified
Component: Language (show other bugs)
Version: R 3.3.*
Hardware: Other Windows 64-bit
: P5 critical
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-05-15 17:58 UTC by Dominique
Modified: 2016-05-17 08:35 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique 2016-05-15 17:58:44 UTC
When a data frame has accentuated colmun names, the function "[<-.data.frame" seems to create a new variable (it should not).

Example:

data <- data.frame(varé1=1:5,varé2=5:1)
data
data[,"varé2"]<-0
data #A new variable has been created, but it should not.
# varé1 varé2 varé2
# 1     1     5     0
# 2     2     4     0
# 3     3     3     0
# 4     4     2     0
# 5     5     1     0

There are now 3 variables in the data frame.
Comment 1 Martin Maechler 2016-05-17 08:29:49 UTC
You are right.  This is actually a consequence of the match() bug PR#16685,   https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16885
which has been fixed a week ago.

Indeed, that bug (new in 3.3.0) has more consequences than anticipated.
We'd recommend using '3.3.0 patched' for now.

*** This bug has been marked as a duplicate of bug 16685 ***
Comment 2 Martin Maechler 2016-05-17 08:35:10 UTC
aargh typo: it's a duplicate (re-reporting) of 16885 , not 16685..

*** This bug has been marked as a duplicate of bug 16885 ***