I am using Rstudio to analyse a dataset using perMANOVA and CAP. The dataset has multiple variables, the specific variables i am looking at are how the scent profile of otters differs with age. Age is categorised into 'adult', 'sub-adult' and 'juvenile', i produced a CAP plot for all scent profiles in their respective age groups, and i have successfully plotted for just adult and juvenile by deleting data in respective sample and metadata files.
However, a problem that i have encountered when trying to compare just "adult and sub adult" and "subadult and juvenile" the CAP plot by doing the same with "adult and juvenile" is the x and y values differ and an ordination plot is unsucessuly plotted. For example, the overall classification success (m=1) was 69.01%, with juveniles 0% and sub-adults 100% successfully grouped respectively.
When i attempt to plot the points it states "> points(plot1,"sites",pch=c(15,17)[smetadat$Age],col=as.numeric(smetadat$Age))Error in xy.coords(x, y) : 'x' and 'y' lengths differ" but when i look at my dataset it seems like the x and y align.
Any ideas how to correct this? Thanks.