plot RDA

78 views
Skip to first unread message

madyouni haifa

unread,
Nov 25, 2022, 9:02:49 AM11/25/22
to ggplot2
Hi,
i am running the following code but i have this error 
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
I want to show both the environmental data and species and especially to add the name of stations can anyone help me to resolve that please

thank youCapture d’écran 2022-11-25 143437.png

data <- read_excel("bioldata.xlsx")

str(data)
data <- as.matrix(data)
view(data)
spe <- data[,20:30]
view(spe)
env<- data.frame(data[,4:19])
view(env)
rda.result <- rda(spe~., data=env)

Margot Tollefson

unread,
Nov 26, 2022, 11:49:01 AM11/26/22
to madyouni haifa, ggplot2

You might try using data.matrix rather than as.matrix.

On Nov 25, 2022, at 8:02 AM, madyouni haifa <madyoun...@gmail.com> wrote:

Hi,
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ggplot2/0928983c-d4e1-4a5b-ab09-2b0ba1b9315cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages