question

Upvotes
Accepted
1 0 0 0

NMDS plot code issue

Good day all, i am new to this forum and novice in using R, i am following a tutorial on tittled R code for ecological data analysis by Umer Zeeshan Ijaz, using his data i was abled to plot NMDS diagram, but with my data which i checked is almost similar with the data he used when i use the code:

#Make a new data frame, and put country, latrine, and depth information there, to be useful for coloring, and shape of points

NMDS=data.frame(x=sol$point[,1],y=sol$point[,2],Samples=as.factor(grouping_info[,1]),Latrine=as.factor(grouping_info[,2]),Depth=as.factor(grouping_info[,3]))

i got an error: Error in `[.data.frame`(grouping_info, , 2) : undefined columns selected

attached pictures (first two) are my data formats and his data (last two).

Need your help to fix this issue. Thank you




windows-10
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
14.7k 39 12 18

Hi @saubanzango ,

Can you please confirm that you are using Refinitiv products or services?

For generic programming questions, I would recommend that you raise this question on stackoverflow.com.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.