Closed PatoUru closed 3 years ago
Hi All! I'm new on R and I'm trying to use amp_ordinate to perform a CCA plot adding the operational data as vectors. But the following error appear:
Error in [.data.frame(data$metadata, , envfit_factor, drop = FALSE) : undefined columns selected
[.data.frame
The metadata (dat) is attached and I run the following envfit_numeric <- factor(dat[, 2:12]) envfit_factor <- factor(dat[, 14:19])
ordinationresult <- amp_ordinate(av2, type = "CCA", constrain = "Season", transform = "Hellinger", sample_color_by = "Season", sample_shape_by = "Reactor", sample_colorframe = TRUE, sample_colorframe_label = "Season", detailed_output = TRUE, species_plot = TRUE, envfit_factor = envfit_factor, envfit_numeric = envfit_numeric, envfit_show = TRUE, filter_species = 0.1)
ordinationresult$plot
I thank you in advance for any suggestions!!
Hi there. You just need to provide a metadata variable name to the envfit_factor and envfit_numeric arguments. Fx envfit_factor = "Season"
envfit_factor
envfit_numeric
envfit_factor = "Season"
Hi All! I'm new on R and I'm trying to use amp_ordinate to perform a CCA plot adding the operational data as vectors.
But the following error appear:
Error in
[.data.frame
(data$metadata, , envfit_factor, drop = FALSE) : undefined columns selectedThe metadata (dat) is attached and I run the following envfit_numeric <- factor(dat[, 2:12]) envfit_factor <- factor(dat[, 14:19])
ordinationresult <- amp_ordinate(av2, type = "CCA", constrain = "Season", transform = "Hellinger", sample_color_by = "Season", sample_shape_by = "Reactor", sample_colorframe = TRUE, sample_colorframe_label = "Season", detailed_output = TRUE, species_plot = TRUE, envfit_factor = envfit_factor, envfit_numeric = envfit_numeric, envfit_show = TRUE, filter_species = 0.1)
ordinationresult$plot
I thank you in advance for any suggestions!!