Can't find function df_to_numeric_matrix #125
-
Hello, I am trying to use the heatmaps.R source file functions to create a correlation heatmap, but when I try to use the cor_heatmap function, I keep getting this error: Error in df_to_numeric_matrix(samdat, vars = vars, trans_fun = var_fun) : This is the code I am trying to run, everything prior to cor_heatmap works. I am really unsure where the df_to_numeric_matrix function is (should it be defined in heatmaps.R, or perhaps there is a package I can't find that has this function?) Thanks for your help! Librarieslibrary(phyloseq) Import functionssource("heatmaps.R") Import phyloseq dataP.count <- readRDS('P.count.RDS') Create variety subsetP.countRAlfalfa <- subset_samples(P.count, Alfalfa == 'Alfalfa') Filter to a min prevalence of 0.1P.countRAlfalfa <- tax_filter(P.countRAlfalfa, min_prevalence = 1/10, min_sample_abundance = 1/10) aggregate to species levelP.speciesAlfalfa <- tax_agg(P.countRAlfalfa, "Species") get random top taxataxa = sample(tax_top(P.speciesAlfalfa, n = 50), size = 20) Alfalfa correlation heatmapcor_heatmap(data = P.speciesAlfalfa, taxa = taxa) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out - I didn't need to source heatmaps.R, only needed to load microViz. |
Beta Was this translation helpful? Give feedback.
Figured it out - I didn't need to source heatmaps.R, only needed to load microViz.