how to add specific only certain labels on PCA plot in R
up vote
0
down vote
favorite
I need your help on something which should be extremely easy to do, but already took me a while to figure out.
When making a PCA plot in R, I need to label only certain category of the data on the graph. Could you help me with an advice how I do that? With the current code (see below) I get all labels, but i need only labels to be shown for the originaldata which do not contain word "No" in a column X.
Thanks!
My code:
plt <- autoplot(
pcadata,
data = originaldata,
colour = 'Woi',
frame.type = 'norm',
frame.colour = 'TasteScore',
size = 3,
) +
geom_text(aes(label = paste(keepRows$Woi)), parse = TRUE)
r label pca
add a comment |
up vote
0
down vote
favorite
I need your help on something which should be extremely easy to do, but already took me a while to figure out.
When making a PCA plot in R, I need to label only certain category of the data on the graph. Could you help me with an advice how I do that? With the current code (see below) I get all labels, but i need only labels to be shown for the originaldata which do not contain word "No" in a column X.
Thanks!
My code:
plt <- autoplot(
pcadata,
data = originaldata,
colour = 'Woi',
frame.type = 'norm',
frame.colour = 'TasteScore',
size = 3,
) +
geom_text(aes(label = paste(keepRows$Woi)), parse = TRUE)
r label pca
1
In your post is missing some code (PCA model for example), external libraries (where does it arriveautoplot()
), data. Could you add them to make your code working and increase the chances to get a good answer?
– s_t
Nov 8 at 8:37
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need your help on something which should be extremely easy to do, but already took me a while to figure out.
When making a PCA plot in R, I need to label only certain category of the data on the graph. Could you help me with an advice how I do that? With the current code (see below) I get all labels, but i need only labels to be shown for the originaldata which do not contain word "No" in a column X.
Thanks!
My code:
plt <- autoplot(
pcadata,
data = originaldata,
colour = 'Woi',
frame.type = 'norm',
frame.colour = 'TasteScore',
size = 3,
) +
geom_text(aes(label = paste(keepRows$Woi)), parse = TRUE)
r label pca
I need your help on something which should be extremely easy to do, but already took me a while to figure out.
When making a PCA plot in R, I need to label only certain category of the data on the graph. Could you help me with an advice how I do that? With the current code (see below) I get all labels, but i need only labels to be shown for the originaldata which do not contain word "No" in a column X.
Thanks!
My code:
plt <- autoplot(
pcadata,
data = originaldata,
colour = 'Woi',
frame.type = 'norm',
frame.colour = 'TasteScore',
size = 3,
) +
geom_text(aes(label = paste(keepRows$Woi)), parse = TRUE)
r label pca
r label pca
edited Nov 8 at 8:32
RLave
2,5281820
2,5281820
asked Nov 8 at 8:21
JTim
12
12
1
In your post is missing some code (PCA model for example), external libraries (where does it arriveautoplot()
), data. Could you add them to make your code working and increase the chances to get a good answer?
– s_t
Nov 8 at 8:37
add a comment |
1
In your post is missing some code (PCA model for example), external libraries (where does it arriveautoplot()
), data. Could you add them to make your code working and increase the chances to get a good answer?
– s_t
Nov 8 at 8:37
1
1
In your post is missing some code (PCA model for example), external libraries (where does it arrive
autoplot()
), data. Could you add them to make your code working and increase the chances to get a good answer?– s_t
Nov 8 at 8:37
In your post is missing some code (PCA model for example), external libraries (where does it arrive
autoplot()
), data. Could you add them to make your code working and increase the chances to get a good answer?– s_t
Nov 8 at 8:37
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203810%2fhow-to-add-specific-only-certain-labels-on-pca-plot-in-r%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
In your post is missing some code (PCA model for example), external libraries (where does it arrive
autoplot()
), data. Could you add them to make your code working and increase the chances to get a good answer?– s_t
Nov 8 at 8:37