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

Allow xyzmatrix method to assign by rownames #469

Open
dokato opened this issue Jun 14, 2021 · 1 comment
Open

Allow xyzmatrix method to assign by rownames #469

dokato opened this issue Jun 14, 2021 · 1 comment

Comments

@dokato
Copy link
Contributor

dokato commented Jun 14, 2021

When I try to assign soma positions to neurolist metadata with xyzmatrix I get only this warning

> xyzmatrix(dps5[,]) <- xyzmatrix(meta)
Warning message:
In matrix(value, n, p) :
  data length [21] is not a sub-multiple or multiple of the number of rows [5]

that results in completely messed up values. See toy data to reproduce.

example.rda.zip

Expected

xyzmatrix recognizes and assigns positions based on rownames of a larger set of neuron body ids from the RHS.

Probably a new xyzmatrix <-matrix` function needed here?

@jefferis
Copy link
Collaborator

Hmm. That is not something I have tried to do in the past. I guess it would be convenient in this scenario, but I wonder if at some point it might be a little fragile. This method will not know that it is a neuronlist attached data.frame, it could be any old data.frame or matrix and we use it a lot in that more general context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants