We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Submitted by: Ricardo Saporta; Assigned to: Arun ; R-Forge link
I searched around for unname data.table and found this thread from v1.8.1
http://r.789695.n4.nabble.com/unname-does-not-work-with-data-table-anymore-td4521647.html
I'm encountering the following error in 1.8.11 and 1.8.10.
DT <- data.table(A = rep(LETTERS, 3), B = seq(78)) unname(DT)
DF <- data.frame(A = rep(LETTERS, 3), B = seq(78)) unname(DF)
Extra problem is that try does not catch the error:
try
inherits(try(unname(DT)), "try-error")
I thought the error might be just in print.data.table Z <- unname(DT) # no error
but then again, maybe not: setnames(Z, c("A", "B"))
Using setattr can put things back to normal
setattr(Z, "names", c("A", "B")) Z
unname( DT [1:21] ) # Error (21 rows) unname( DT [2:22] ) # Error (21 rows) unname( DT [2:21] ) # No Error (20 rows)
unname( DT [30:50] ) # Error (21 rows) unname( DT [30:49] ) # No Error (20 rows)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Submitted by: Ricardo Saporta; Assigned to: Arun ; R-Forge link
I searched around for unname data.table and found this thread from v1.8.1
http://r.789695.n4.nabble.com/unname-does-not-work-with-data-table-anymore-td4521647.html
I'm encountering the following error in 1.8.11 and 1.8.10.
DT <- data.table(A = rep(LETTERS, 3), B = seq(78))
unname(DT)
data.frame analogous
DF <- data.frame(A = rep(LETTERS, 3), B = seq(78))
unname(DF)
Extra problem is that
try
does not catch the error:inherits(try(unname(DT)), "try-error")
[1] FALSE
I thought the error might be just in print.data.table
Z <- unname(DT) # no error
but then again, maybe not:
setnames(Z, c("A", "B"))
Using setattr can put things back to normal
setattr(Z, "names", c("A", "B"))
Z
is it possible that the error is only
occurrenting when there are more than 20 rows?
unname( DT [1:21] ) # Error (21 rows)
unname( DT [2:22] ) # Error (21 rows)
unname( DT [2:21] ) # No Error (20 rows)
unname( DT [30:50] ) # Error (21 rows)
unname( DT [30:49] ) # No Error (20 rows)
The text was updated successfully, but these errors were encountered: