-
Notifications
You must be signed in to change notification settings - Fork 34
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
fnrow()
returns error for 0-column data frames
#344
Comments
Thanks, I however don't see how this could be solved efficiently in R. The function is currently defined as
so the error comes from |
Thanks, I would add that I think it affects other functions such as Would something like this maybe work? fnrow <- function (X){
if (inherits(X, "data.frame")){
length(attr(X, "row.names", exact = TRUE))
} else {
NULL
}
} You can maybe use the fact that data.frames have a row.names attribute though it's a bit slower than |
Thanks. I have rewritten fnrow in C. It is in the main branch now. |
Hi, I noticed that
fnrow()
throws an out of bounds error when called on a data frame with 0 columns.See an example below.
Many thanks
The text was updated successfully, but these errors were encountered: