Closed SimonGoring closed 10 years ago
Haven't looked closely but could that be NCOL()
, which would work with a vector as well as a matrix, instead of the lowercase version?
Having had a quick look, NCOL()
could work, but several places after counts
is first created you are subsetting without drop = FALSE
which is probably where the real problem lies. You could fix the rep()
call but things could still fail later on. Best to ensure counts
stays a data frame throughout.
Thanks Gavin, I figured that was the problem, I just didn't want to fix it right away so I left this up to remind me since I don't get around to playing with mammal data as much as I do with the pollen data. I think keeping counts as a dataset is the way to go.
Sorry, just to comment this out. Fixed in commit c200d62, just added the drop = F
just like @gavinsimpson said. Worked like a charm.
Some sites throw an error:
Error in rep(NA, ncol(counts)) : invalid 'times' argument
This happens in the get.samples function in get_download, I assume it' because there's only one sample, but need to debug later. Happens for example on datasetid 4574