- 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
3K+ Views
To convert list elements into a single string, we can use paste function but firstly we would need to unlist the elements. Also, since we want to create a single string double quotes will be required at the end of the output. For example, if we have a list that ... Read More
Nizamuddin Siddiqui
4K+ Views
The above error means plot is not being created yet hence abline function cannot be used to draw anything on the plot. Therefore, a plot needs to be created first to use abline function for creating a line or any other thing. Mostly, abline is used to create regression line ... Read More
Nizamuddin Siddiqui
301 Views
To replace a complete column in an R data frame, we can set the original one to new values by using delta operator. For example, if we have a data frame called df that contains a column x which 500 has values from normal distribution then to replace it with ... Read More
Nizamuddin Siddiqui
652 Views
To change the partial plot background, we can create a rectangle using geom_rect function by defining both the axes values and alpha for transparency, the color will be changed by using fill argument. The value of alpha will completely hide the grey background and we can play with its value ... Read More
Nizamuddin Siddiqui
9K+ Views
To convert NaN to NA in an R data frame, we can set the NaN values to NA values by using single square brackets. Firstly, we would need to access the column that contains NaN values then NaN values will be accessed using is.nan then we can set those values ... Read More
Nizamuddin Siddiqui
942 Views
A dummy variable is a type of variable that takes a value of 1 if the value for which the dummy variable is created exists in the data frame, otherwise it takes 0. Therefore, if we have a one binary variable in a data frame then there will be two ... Read More
Nizamuddin Siddiqui
7K+ Views
A binary variable is a type of variable that can take only two possible values like gender that has two categories male and female, citizenship of a country with two categories as yes and no, etc. If the binary variable is not in 0/1 format then it can be converted ... Read More
Nizamuddin Siddiqui
12K+ Views
To add an extra point to scatterplot using ggplot2, we can still use geom_point function. We just need to use aes function for quoting with new values for the variables, also we can change the color of this point using colour argument. The display of an extra point will help ... Read More
Nizamuddin Siddiqui
3K+ Views
To extract words from a string vector, we can use word function of stringr package. For example, if we have a vector called x that contains 100 words then first 20 words can be extracted by using the command word(x, start=1, end=20, sep=fixed(" ")). If we want to start at ... Read More
Nizamuddin Siddiqui
93 Views
To find the rate of return for a vector values, we can use the formula for rate of return. For example, if we have a vector called x then the rate of return can be calculated by using the syntax diff(x)/x[-length(x)]. The output will be in decimal form and if ... Read More