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
Problem with ordiellipse coloured factor in Vegan
2 messages · suparna mitra, John Kane
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
-----Original Message-----
From: suparna.mitra.sm at gmail.com
Sent: Fri, 17 May 2013 11:56:52 +0800
To: r-help at r-project.org
Subject: [R] Problem with ordiellipse coloured factor in Vegan
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
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!