- 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
2K+ Views
If we want to create side by side barplot for two vectors or two columns of same or different data frames then we first need to combine those vectors or columns with the help of cbind function as shown below. After that barplot function will be applied to the combined ... Read More
Nizamuddin Siddiqui
1K+ Views
To change the color of bars in base R barplot, we can use col argument inside the barplot function.For example, if we have a vector called V for which we want to create the barplot then we can use the command given below to get the bars in blue color ... Read More
Nizamuddin Siddiqui
199 Views
To create an alternately increasing sequence, we can take help of logical constants in the R language that is TRUE and FALSE. While creating a vector, the first value will be set to FALSE and the second value will be set to TRUE, therefore, the resulting vector will always have ... Read More
Nizamuddin Siddiqui
599 Views
To find the n number of quartiles for every row in an R data frame, we can use apply function along with quantile function.For example, if we have a data frame called df that contains hundred rows and we want to find two quartiles say first and third for each ... Read More
Nizamuddin Siddiqui
403 Views
When we use apply function on numerical as well as character column then the output of the function returns NA for all hence to deal with this problem, we can use lapply function. The lapply function will take each column into account independently, therefore, the arithmetic operations will be performed ... Read More
Nizamuddin Siddiqui
167 Views
If we have a data frame that contains some lower case and some upper-case string values then we might want to subset the data frame based on lower case or upper-case letters.For this purpose, we can make use of apply and sapply function as shown in the below examples.Example 1Following ... Read More
Nizamuddin Siddiqui
2K+ Views
To check for equality of three columns by row, we can use logical comparison of equality with double equal sign (==) and & operator.For example, if we have a data frame called df that contains three columns say C1, C2, and C3 and we want to check for equality of ... Read More
Nizamuddin Siddiqui
2K+ Views
To create a lagged column in an R data frame, we can use transform function.For example, if we have a data frame called that contains a column say C and we want to create a lagged column in df based on C then we can use the command given below ... Read More
Nizamuddin Siddiqui
114 Views
To add all columns by row, we can use rowSums function.For example, if we have a data frame called df that contains five columns say x, y, z, a, and b and we want to add all these columns by row then we can use the below mentioned command −df$Total_sumRead More
Nizamuddin Siddiqui
3K+ Views
To convert the data type of all columns from integer to factor, we can use lapply function with factor function.For example, if we have a data frame called df which has all integer columns then we can use the below given command to convert all columns data type to factor ... Read More
To Continue Learning Please Login
Login with Google