Which command is Opposite of in

0 votes
May 28, 2018 in Data Analytics by shams
• 3,670 points
553 views

1 answer to this question.

0 votes

We can use the ! operator inorder to make any TRUE FALSE or FALSE TRUE.
So consider a condition where, a categorical variable V1 in a data frame n can have values represented by the letters from A to Z. I want to create a subset m, which excludes some values, say, C, N and P.
m = subset(n, !(V1 %in% c('C','N',P'))) // opposite of %in%

answered May 28, 2018 by zombie
• 3,790 points

Related Questions In Data Analytics

+1 vote
1 answer

How to find out which version of R is loaded

You can use sessionInfo() to accomplish that. > sessionInfo() R version ...READ MORE

answered Nov 8, 2018 in Data Analytics by Maverick
• 10,840 points
440 views
0 votes
3 answers

R vs MATLAB, which is better with respect to machine learning?

Hello, Both are a good programming language you ...READ MORE

answered Apr 12, 2019 in Data Analytics by SA
• 1,090 points
1,098 views
0 votes
1 answer
0 votes
1 answer

How to drop rows of Pandas DataFrame whose value in certain coulmns is NaN

Hi@DataKing99, You can create one function according to ...READ MORE

answered May 7, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by MD 1,452 views
+1 vote
2 answers

Locating row index of a column which has the maximum value - R

Hi, Nirvana You can also try this. which(iris$Sepal.Length == ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
12,644 views
+1 vote
1 answer

Binding rows of 2 data-frames which have non-identical columns

You can use the smartbind() function from ...READ MORE

answered May 22, 2018 in Data Analytics by Bharani
• 4,660 points
5,799 views
0 votes
1 answer

How to write a custom function which will replace all the missing values in a vector with the mean of values in R?

Consider this vector: a<-c(1,2,3,NA,4,5,NA,NA) Write the function to impute ...READ MORE

answered Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
4,209 views
+10 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 9, 2018 in Data Analytics by Abhi
• 3,720 points
1,120 views
0 votes
1 answer

How to find out the package version which is loaded in R?

You can use sessionInfo() to accomplish that. > ...READ MORE

answered Apr 18, 2018 in Data Analytics by zombie
• 3,790 points
524 views
0 votes
1 answer

R language has several packages for solving a problem. How do you make a decision on which one is the best to use?

CRAN package ecosystem has more than 6000 ...READ MORE

answered Jun 5, 2018 in Data Analytics by zombie
• 3,790 points
952 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP