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

[.neuronlistfh fails when nl has no attached df #250

Closed
jefferis opened this issue Jun 26, 2015 · 0 comments
Closed

[.neuronlistfh fails when nl has no attached df #250

jefferis opened this issue Jun 26, 2015 · 0 comments
Labels
Milestone

Comments

@jefferis
Copy link
Collaborator

If the attached data.frame is null then the resultant neuronlist ends up without names. I would say the bug is here:

`[.neuronlistfh`<-function (x, i, ...) 
{
    if (!is.character(i)) 
        i = names(x)[i]
    l = lapply(i, function(n) x[[n]])
    as.neuronlist(l, df = attr(x, "df")[i, ])
}

The solution I think is to use sapply (which keeps names)

@jefferis jefferis added the bug label Jun 26, 2015
@jefferis jefferis added this to the 1.7 milestone Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant