Which inbuilt function can be used in such case ?

0 votes

If you want to know all the values in c (1, 3, 5, 7, 10) that are not in c (1, 5, 10, 12, 14). Which in-built function in R can be used to do this? Also, how this can be achieved without using the in-built function.

Oct 10, 2018 in Data Analytics by shams
• 3,580 points
26 views

1 answer to this question.

0 votes
Using in-built function - setdiff(c (1, 3, 5, 7, 10), c (1, 5, 10, 11, 13))

Without using in-built function - c (1, 3, 5, 7, 10) [! c (1, 3, 5, 7, 10) %in% c (1, 5, 10, 11, 13).
answered Oct 10, 2018 by zombie
• 3,690 points

Related Questions In Data Analytics

0 votes
1 answer

Which function can I use to clear the console in R and RStudio ?

Description                   Windows & Linux           Mac Clear console                      Ctrl+L ...READ MORE

answered Apr 17, 2018 in Data Analytics by anonymous
1,847 views
0 votes
1 answer

How can I use which() function in R ?

which() function determines the position of elements ...READ MORE

answered Sep 24, 2018 in Data Analytics by Daisy
• 8,050 points
42 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,690 points
184 views
0 votes
1 answer

Which package is used to do data import in R and Python and How do you import SAS data?

We can do data import using multiple ...READ MORE

answered Aug 24, 2018 in Data Analytics by Anmol
• 3,620 points
39 views
0 votes
1 answer

Can R and hadoop be used together to get better results?

The most common way to link R ...READ MORE

answered Nov 2, 2018 in Data Analytics by Maverick
• 10,040 points
24 views
0 votes
1 answer

Can rows be converted into columns in R?

You can use of the R package ...READ MORE

answered Dec 11, 2018 in Data Analytics by Maverick
• 10,040 points
42 views
0 votes
3 answers

Can a C program be written in R programming language?

If you have a algorithm you can ...READ MORE

answered Apr 9 in Data Analytics by anonymous
64 views
0 votes
1 answer

R function for finding the index of an element in a vector?

Yes, we can find the index of ...READ MORE

answered Apr 13, 2018 in Data Analytics by zombie
• 3,690 points
712 views
0 votes
1 answer

How can I drop columns by name in a data frame ?

We can Drop Columns by name in ...READ MORE

answered Apr 13, 2018 in Data Analytics by zombie
• 3,690 points
45 views