Error when memory=TRUE; length of 'dimnames' [2] not equal to array extent
- Dominant language
- HTML
- Stars
- 16
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I have observed an error when running TITAN:
```r
test <- titan(ENV20, TAXA20, memory=TRUE)
```
```r
Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, :
length of 'dimnames' [2] not equal to array extent
```
This error seems to appear only when running the memory=TRUE flag for datasets that warn that they have a low number of pure and reliable data and have no z- or z+ taxa, like so:
```r
test <- titan(ENV20, TAXA20, memory=FALSE)
```
```r
Number of z- taxa = 0, Number of z+ taxa = 0
Warning message:
In titan(ENV20, TAXA20) :
Low number of pure and reliable taxa, sum(z) output should be interpreted with caution
```
These datasets will run and return with the warning above if memory=FALSE. There is also no error when datasets do have sufficient data and produce z- and z+ taxa as in the vignette data.
Attached is a small set of sample data in which I have observed the error when memory=TRUE:
[ENV20.txt](https://github.com/dkahle/TITAN2/files/3234283/ENV20.txt)
[TAXA20.txt](https://github.com/dkahle/TITAN2/files/3234284/TAXA20.txt)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running titan(ENV20, TAXA20, memory=TRUE) with the attached ENV20.txt and TAXA20.txt files, then compare the memory=FALSE result and the vignette data. Trace the path taken when there are zero z- and z+ taxa. Done means the memory-enabled run completes without the dimnames error while preserving the existing warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100