- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2038 Articles for R Programming
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
3K+ Views
A probability distribution is the type of distribution that gives a specific probability to each value in the data set. For example, if we have a variable say X that contains three values say 1, 2, and 3 and each of them occurs with the probability defined as 0.25, 0.50, and 0.25 respectively then the function that gives the probability of occurrence of each value in X is called the probability distribution. In R, we can create the sample or samples using probability distribution if we have a predefined probabilities for each value or by using known distributions such as ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
245 Views
If we want to create a subset of a data frame based on multiple numerical columns then we can follow the below steps −Creating a data frame.Subsetting the data frame with the help of filter function of dplyr package.Create the data frameLet's create a data frame as shown below − Live Demox1
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
260 Views
Subsetting is one of the commonly used technique which serves many different purposes depending on the objective of analysis. To subset a data frame if numerical column is greater than a certain value for a particular category in grouping column then we need to follow the below steps −Creating a data frame.Subsetting the data frame with the help of filter function of dplyr package.Create the data frameLet's create a data frame as shown below − Live Demox
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
102 Views
Subsetting is one of the commonly used technique which serves many different purposes depending on the objective of analysis. To subset a data frame if one of the supplied grouping values is found means that we want to subset if any of the categorical variable values is present in the categorical column and if we want to include a numerical column for a greater than value then we need to follow the below steps −Creating a data frame.Subsetting the data frame if any of the supplied value of categorical variable exist and a numerical column value is greater than a ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
30 Views
Subsetting is one of the commonly used technique which serves many different purposes depending on the objective of analysis. To subset a data frame if one of the supplied grouping values is found means that we want to subset if any of the categorical variable values is present in the categorical column, for this purpose we can follow the below steps −Creating a data frame.Subsetting the data frame if any of the supplied value of categorical variable exist.Create the data frameLet's create a data frame as shown below − Live Demox
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
3K+ Views
An ordinal variable is a type of categorical variable which has natural ordering. For example, an ordinal variable could be level of salary something defined with Low, Medium, and High categories here we have three categories but there exists a natural order in these categories as low salary is always less than the medium, medium is always less than high. To create an ordinal variable in R, we can use the order argument along with factor function while creating the variable. Follow the below steps to create an ordinal variable in R −Create a categorical column with factor function where ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
2K+ Views
Subsetting is one of the commonly used technique which serves many different purposes depending on the objective of analysis. To subset a data frame by excluding a column with the help of dplyr package, we can follow the below steps −Creating a data frame.Subsetting the data frame based on numerical as well as categorical column at the same time with the help of filter function of dplyr package.Create the data frameLet's create a data frame as shown below − Live DemoLevel
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
1K+ Views
If we want to create a scatterplot with two legends then we must be having two categorical or factor columns. This can be done by using the below steps −Creating a data frame with two numerical and two categorical columnsCreating the scatterplot with shape and color argument of geom_point function of ggplot2 packageCreate the data frameLet's create a data frame as shown below − Live Demox
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
443 Views
Subsetting is one of the commonly used technique which serves many different purposes depending on the objective of analysis. To subset a data frame by excluding a column with the help of dplyr package, we can follow the below steps −Creating a data frame.Subsetting the data frame by excluding a column with select function of dplyr package.Create the data frameLet's create a data frame as shown below − Live Demox1
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
722 Views
To subset rows of an R data frame if any columns have values greater than a certain value, we can follow the below steps −First of all, create a data frame.Then, use filter_all function of dplyr package with any_vars function to subset the rows of the data frame for any columns having values greater than a certain value.Create the data frameLet's create a data frame as shown below − Live Demox1