I have imported a txt data frame into rstudio using the read.table function and then created a subset of that data and want to get the colmeans but i get an error that says "Error in colMeans(data) : 'x' must be numeric" i dont know what that means because I am doing this and i have an example that i am reffering to and the code does not differ so Im so confused.
That is a screenshot, we can't copy from that to try to give you a working solution. I suspect that your variables are being treated as character vectors because of the comma in the number format but I can't be sure since you are not providing sample data, you can try converting them using as.numeric() function.