[R] r bug (?) display of data
Marc Jekel
feuerwald at gmx.de
Thu Jul 9 11:05:54 CEST 2009
Hi R Fans,
I stumbled across a strange (I think) bug in R 2.9.1. I have read in a
data file with 5934 rows and 9 columns with the commands:
daten = data.frame(read.table("C:/fussball.dat",header=TRUE))
Then I needed a subset of the data file:
newd = daten[daten[,1]!=daten[,2],]
--> two values do not meet the logical specification and are dropped.
The strange thing about it: When I print the newd in the R Console, the
output still shows 5934 rows. When I check the number of rows with
NROW(newd) , I get 5932 as output. When I print newd[5934, ], I get NAs.
When I print newd[5932, ] I get the row that is listed in line 5934 when
I just type in newd. This is totally crazy! Has anyone had the same
problem? Thanks for a post.
Marc
More information about the R-help
mailing list