Skip to content

Problem with ordiellipse coloured factor in Vegan

2 messages · suparna mitra, John Kane

#
Hello R experts,
  I am trying to plot ordiellipse for my data but the col according to
factors.

Metabolites_raw= read.csv(file.choose(), head = TRUE) #file
21Metabolites.csv

Metabolites_t=t(Metabolites_raw[,2:82])

ord <- metaMDS(Metabolites_t, distance="bray")

symbol=as.numeric(Metab_metadata$LandType)

col.list <- c("red","slategray","seagreen","cyan","pink","brown","black",
"blue","yellow","magenta")

 palette(col.list)

 plot(ord$points, col = Metab_metadata$Day+2,pch=symbol, xlim=c(-0.3,0.35))

legend(.28,.25, c("0", "8", "16"),fill = c(2, 10,18))

# draw dispersion ellipses around data points

groupz <-c(2,10,18)

for(i in seq(groupz)) {

ordiellipse(ord, Metab_metadata$Day, kind = "sd", label = T,col=groupz[i],
show.groups=groupz[i])

}

Now here I get the error

Error in text.default(...) : no coordinates were supplied (But sometimes
same code works. I am not sure what am I doing wrong.)

Data files are attached.

Any help will be really great.

Thanks,

Mitra
#
No data.  The list tends to strip out many kinds of attachements including csv files. I'd suggest trying .txt or parking the data at someplace like [url=http://www.mediafire.com/][b]MediaFire[/b][/url] or
Dropbox [url=https://www.dropbox.com/][b]Dropbox[/b][/url]

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!