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

as.FLQuant(data.frame) should only alter the dimanmes added in dimnames= #61

Open
iagomosqueira opened this issue Mar 31, 2020 · 3 comments
Assignees

Comments

@iagomosqueira
Copy link
Member

If a data.frame with year,data is converted using

dfs <- as.FLQuant(dat, units="", dimnames=list(age=0))

The year dimnames are reset by the dimnames argument.

@iagomosqueira iagomosqueira self-assigned this Mar 31, 2020
@MAJJIH
Copy link

MAJJIH commented Apr 8, 2020

Sir i want convert length to age per year i have this problem
I have length start from 5 to 23.5 with step 0.5 and 11 years from 2008 to 2019
Landings.n.flq <- FLQuant(Landings.n.matrix ,dimnames=list(len=seq(5,23.5,by=0.5), year = 2008:2018))
Error in array(object, dim = dim, dimnames = filldimnames(dimnames, dim = dim)) :
length of 'dimnames' [2] not equal to array extent

@iagomosqueira
Copy link
Member Author

Without seeing the matrix, I notice you say it goes from 2008 to 2019, but the call to FLQuant() gives dimnames as year=2008:2018. The error says the length of dimension 2 (year) and dimnames[2] do not match.

@MAJJIH
Copy link

MAJJIH commented Apr 8, 2020

thank you so match

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