![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
376 Views
To standardize data.table object column by group, we can use scale function and provide the grouping column with by function.For Example, if we have a data.table object called DT that contains two columns say G and Num where G is a grouping column and Num is a numerical column then ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
129 Views
Suppose we have three columns say X, Y, and Z in an R data frame called df and we want to replace values in columns X and Y with the same value if the values are greater than values in Z and if they are less than the values in ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
2K+ Views
The random replacement values in an R data frame column can be done with the help of sample function along with nrow function and single square subsetting.For Example, if we have a data frame called df that contains a columns say X and we want to randomly replace 5 values ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
378 Views
To multiply corresponding values from two data.table objects in R, we can follow the below steps −First of all, create two data.table objects.Then, use mapply function to multiply corresponding values from those two data.table objects.ExampleCreate the first data.table objectLet’s create a data.table object as shown below −library(data.table) x1Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
147 Views
To display both axes’ labels of a ggplot2 graph in italics in R, we can use theme function where we can set the face of axis.text.x and axis.text.y argument to italic.For Example, if we have a data frame called df that contains two columns say X and Y then we ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
96 Views
To find the percentage of zeros in each column of a matrix in R, we can follow the below steps −First of all, create a matrix.Then, use colSums function along with nrow function to find the percentage of zeros in each column.Example 1Create the matrixLet’s create a matrix as shown ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
To change the color of a particular bar using geom_bar in R, we can provide the count corresponding to the value for which we want to change the color inside aes function.For Example, if we have a data frame called df that contains two columns say V and F where ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
61 Views
To round each value in columns 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 round each value in columns if some columns are categorical.ExampleCreate the data frameLet’s create a ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
243 Views
To find the log2 of each value 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 log2 if some columns are categorical.ExampleCreate 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
3K+ Views
To add a value to a particular matrix element in R, we can use subsetting for the particular value with single square brackets.For Example, if we have a matrix called M and we want to add 10 to the fifth value in second column then can use the below mentioned ... Read More