
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 26504 Articles for Server Side Programming

7K+ Views
If we have many unique elements or repeated in a column of an R data frame and create a graph using that column, either on X-axis or Y-axis then R automatically choses the axes labels, this might not display all the unique values of the column in the plot. Therefore, we can use scale_x_continuous function or scale_y_continuous function with labels depending on our requirement to display the column values.Consider the below data frame −Example Live Demox

441 Views
There can be multiple authors of a package in R and we might want to use their name if we are using their package in our publication for research, books, courses or any other type of content. Therefore, it is required to find out all the authors who contributed to a particular package and this can be done by using citation function with package name as shown in the below examples.Examplecitation("ggplot2")To cite ggplot2 in publications, please use −H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.A BibTeX entry for LaTeX users is@Book{, author = {Hadley Wickham}, ... Read More

1K+ Views
Finding the variance of columns is a common task in data analysis but often data is provided in wide format instead of long format, therefore, the cases are represented vertically and the variables are aligned horizontally and this data could be available in matrix or any other form. Therefore, the variance can be easily found by using apply function.Example Live DemoM1

311 Views
If we want to create a regression line inside scatterplot then lines function can be used with the linear model function lm but if we want to do it for a particular range of independent variable then this range needs to be defined and passed within the lines function. Check out the below example of linear regression model that considers a range of independent variable for prediction.Consider the below vectors −Examplestrsplit(x6,"[*]")OutputDefining the range of x −Range_of_x

184 Views
When we deal with text data it is difficult to make it clean and one of the most of basic problem with this type of data is that the values are separated with some unique characters such as special characters. For this purpose, we can use strsplit function that makes it easy to do the separation among text values. Check out the examples below to understand how it can be done.Example Live Demox1

4K+ Views
We can use str_detect function to check whether a single string or a vector of strings is in lowercase or uppercase. Along with str_detect function, we need to use either upper or lower to check whether the string is in lowercase or uppercase and the output will be returned in TRUE or FALSE form, if the string will be in lowercase and we pass lower with str_detect function then the output will be TRUE and vice-versa.Example Live Demox1

1K+ Views
To find the rank of a vector of elements we can use rank function directly but this will result in ranks from smallest to largest. For example, if we have a vector x that contains values 1, 2, 3 in this sequence then the rank function will return 1 2 3. But if we want to get ranks from largest to smallest then it would be 3 2 1 and it can be done in R as rank(-x).Example Live Demox1

2K+ Views
Mostly, we get data that contain column names in lowercase or just first letter is in upper case. If we want to convert those column names to all capital letter words or uppercase then toupper function can be used to the names of the columns. This can be done by using the below syntax −Syntaxnames(“data_frame_name”)

319 Views
To create the simple logistic model, we need to use glm function with family = binomial because the dependent variable in simple logistic model or binomial logistic model has two categories, if there are more than two categories then the model is called as multinomial logistic model. If we want to extract the odds ratio of slope and intercept from the simple logistic model then exp function needs to be used with model object as shown in the below examples.Example Live Demoset.seed(999) x1

242 Views
Suppose we have a data frame df1 that contains 5 columns and another data frame df2 that contains only column but the data type of the columns in both the data frames is same. Now we might want to add the column of the second data frame starting at the end of the rows of the first data frame by creating the same number of columns as in first data frame. This might be required by researchers to understand the impact of an external variable on the result of the analysis and it can be done with the help of ... Read More