Hello,

I am converting my data into a Euclidean dissimilarity matrix but I have a problem.

I have multiple response variables and when I run the matrix with all my data, including all response variables, it gives me an output but I have no idea which response variable the output is for. I ended up creating separate csv files for each individual response variable so that when I run the matrix, I know what the output is for. However, I was wondering if there was a simpler way, possibly including something in the vegdist code so that it only uses a certain column and I can distinguish between each variable.

For example,

I tried using the data frame with ALL my response variables and included an argument to call out only one column "LT_R"

vegdist(T_data ~ LT_R, method="euclidean", binary=FALSE, diag=FALSE, upper=FALSE, na.rm=FALSE

but that gave me an error.

I also tried the same thing with a comma instead of a ~

vegdist(T_data, LT_R, method="euclidean", binary=FALSE, diag=FALSE, upper=FALSE, na.rm=FALSE

and it gave me an output but when I compared the numbers it gave me from this (all my data) compared to the csv file I have that ONLY contains the response variable LT_R the numbers did not match so I'm assuming the argument didn't work.

I basically just need a simpler way to run the matrix on all my response variables separately while keeping my data frame whole with all my data.

Any help is appreciated!! Thank you.