This is a test version of Biostars. For the public version, visit https://www.biostars.org.
%% error in Rstudio
dc.markers %>% group_by(cluster) %>% top_n(2, wt = avg_logFC)

the above code is giving error even after using dplyr and matrix libraries in seurat analysis in rstudio

Error: Problem with `filter()` input `..1`.
i Input `..1` is `top_n_rank(2, avg_logFC)`.
x object 'avg_logFC' not found
i The error occurred in group 1: cluster = 0.
Run `rlang::last_error()` to see where the error occurred.
seurat r

1 answer

Try with avg_log2FC, They changed the names of the columns in the newer version

Log in to answer this question.