question

Upvotes
Accepted
1 0 0 1

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.

Hi @saubanzango ,

Could you please provide the pictures or the code used for further investigation.

Thanks,
AHS

hi @saubanzango

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
22k 59 14 21

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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