![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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
Nizamuddin Siddiqui has Published 2307 Articles
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
124 Views
To find the column maximum if some columns are categorical in R data frame, we can follow the below steps −First of all, create a data frame.Then, use numcolwise function from plyr package to find the column maximum if some columns are categorical.Example 1Create the data frameLet’s create a data ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
679 Views
To replace numbers written in words with numbers in an R data frame column, we can use within function.For example, if we have a data frame called df that contains a column say X having numbers from 1 to 5 written in words then we can convert them into numbers ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
327 Views
A dichotomous column can be represented by words such as Yes/No, Good/Bad, Right/Wrong etc. To replace such words with number, say 1 and 0 we can use ifelse function.For example, if we have a data frame called df that contains a column Binary with Yes and No values then we ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
498 Views
To select data frame columns based on their class in R, we can follow the below steps −First of all, create a data frame or consider an inbuilt data set.Then, use select_if function of dplyr package with class function.Example 1str(CO2)OutputOn executing, the above script generates the below output(this output will ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
217 Views
To create a histogram for uniform data in R, we can simply use hist function but the bars size may vary even if the frequency is same. Therefore, for this purpose, we need to define the breaks as shown in the below example.ExampleTo create a histogram for uniform data in ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
2K+ Views
To find the smallest number in an R data frame column excluding values zero or less, we can use min function along with subsetting of values greater than 0 through single square brackets.For example, if we have a data frame called df that contains a column say X then the ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
To find the dot product of two matrices in R, we can use dot function of geometry package.For Example, if we have two matrices say matrix1 and matrix2 then we can use the dot product of these two matrices by using the below given command −dot(matrix1, matrix2)Example 1Following snippet creates ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
3K+ Views
The empirical distribution can be found by using the function ecdf and if we want to create a plot of empirical distribution then plot function will be used.For example, if we have a vector called X then plot of empirical distribution can be created by using the below command −plot(ecdf(X))Example ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
58 Views
To create sequential index value for binary column assigning 0 to FALSE values in data.table object in R, we can follow the below steps: −First of all, create a data.table object with binary column.Then, use rle function along with sequence and lengths function to create sequential index column.ExampleCreate the data.table ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
4K+ Views
When we create a general linear model for logistic regression model, we need to specify the distribution family as binomial. The error “NA/NaN/Inf” occurs when we do not specify the distribution family. Hence, family="binomial" needs to be used inside glm function while creating the logistic regression model.Example 1Following snippet creates ... Read More