At the very end of your qiime2R tutorial, I was directed to MicrobeR tutorial. I am still using the same set of data, hoping to make some bar plots as in your tutorial, while got stuck in the summarize.taxa step. I ran following commands:
and got following error message:
Error in TAXONOMY[rownames(FEATURES), ] : incorrect number of dimensions
I thought this might be caused by the taxonomy column, which is not separated into “kingdom”, “phylum”…“Species”. So I ran the commands to separate the taxon column in taxonomy file following your way mentioned in your qiim2R tutorial, and it worked. The new taxonomy file was “taxtable”. Then, I rerun the command using taxtable instead:
then I got another error message:
Error in gsum(FEATURES) : GForce sum can only be applied to columns, not .SD or similar. To sum all items in a list such as .SD, either add the prefix base::sum(.SD) or turn off GForce optimization using options(datatable.optimize=1). More likely, you may be looking for 'DT[,lapply(.SD,sum),by=,.SDcols=]'
gforce(thisEnv, jsub, o__, f__, len__, irows)
`[.data.table`(SUMMARIZED.TAXA[[level]], , lapply(.SD, sum), by = TaxaString)
SUMMARIZED.TAXA[[level]][, lapply(.SD, sum), by = TaxaString]
as.data.frame(SUMMARIZED.TAXA[[level]][, lapply(.SD, sum), by = TaxaString])
could you please let me know what happened for this step and how this could be fixed? Thank you very much.