Comments (4)
Hi, it works fine in this example. Can you provide a minimal working example that shows the problem? Or am I misunderstanding the problem?
library(ggord)
library(vegan)
library(dplyr)
iris2 <- iris %>%
mutate(
Species = case_when(
Species == 'setosa' ~ 'spp1',
Species != 'setosa' ~ 'spp2'
)
)
# prcomp
ord <- prcomp(iris2[, 1:4])
p <- ggord(ord, grp_in = iris2$Species)
p
from ggord.
Hi,
Thanks for your reply. Actually, u misunderstood my question. In your case, the group spp1 and spp2 have more than 2 observations (row is more than 4, in your case the row is 150). The problem is if the row is no more than 4, it will report the error. The data is as followed:
from ggord.
Ah, I see. Problem is it's trying to create confidence ellipses for groups with less than three observations. Set ellipse = F
and you should be good to go.
from ggord.
And for what it's worth, I added an error message indicating the same if there's insufficient observations to create the ellipses.
library(ggord)
library(vegan)
library(dplyr)
iris2 <- iris %>%
mutate(
Species = case_when(
Species == 'setosa' ~ 'spp1',
Species != 'setosa' ~ 'spp2'
)
) %>%
.[c(1:2, 51:52),]
# prcomp
ord <- prcomp(iris2[, 1:4])
ggord(ord, grp_in = iris2$Species)
## Error in ggord.default(obs, vecs, axes, ...) :
## Insufficient observations for confidence ellipses, set ellipse = F to plot
from ggord.
Related Issues (20)
- Is there an option to define color for the labels of the vectors? HOT 1
- dotted and solid ellipses by group HOT 3
- legend for species points HOT 1
- add methods for capscale and dbrda objects HOT 1
- Reducing number of vectors HOT 1
- Changing point shape with different grouping variable HOT 3
- Word 'italic' showing up in rda plots HOT 2
- Request - GGord repel = True AND maxoverlap / force HOT 8
- I can't install ggord HOT 2
- Error when using just one explanatory variable in a RDA model HOT 3
- Impossible to install with R 4.2.1 HOT 1
- Add species name in ggord() db-RDA plotting HOT 2
- Group and facet ggord plot using separate variables HOT 2
- Travis builds are breaking.... HOT 1
- arrow lines in CA plot HOT 1
- Plotting on variables or cases HOT 1
- point and font size in CA HOT 2
- ggord: allow filled ellipses using geom_polygon HOT 2
- ellipse colors mapping is incorrect with points if ellipse can't be estimated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ggord.