×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Nizamuddin Siddiqui
has Published
1482
Answers
How to test for significant relationship between two categorical columns of an R data frame?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 12:15:52
To test for the significance of proportion between two categorical columns of an R data frame, we first need to find the contingency table using those columns and then apply the chi square test for independence using chisq.test. For example, if we have a data frame called df that contains ...
Read More
How to replace a particular value in R data frame with a new value?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 12:11:37
To replace a particular value in R data frame with a new value, we can use ifelse function where the new value will be placed after the condition and if the column values do not match the condition then the same column will be placed. For example, if we have ...
Read More
How to create boxplot in base R with higher width of the box lines?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 12:06:50
To create boxplot in base R with higher width of the box lines, we can use the boxlwd argument inside boxplot function. For example, if we have a vector called x then we can create the boxplot with higher width of the box lines using the command −boxplot(x, boxlwd=5)Example Live Demox<-rnorm(10000) ...
Read More
How to find the fractional power of a negative number in R?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 12:03:33
To find the fractional power of a negative number, we can find the power separately for the numerator and denominator where denominator will have the numerator 1. For example, if we have a vector called x that contains a single value -10 then the fractional power 15/7 of x can ...
Read More
How to find the sum of every n values if missing values exists in the R data frame?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 12:01:17
To find the sum of every n values in R data frame columns if there exist missing values, we can use rowsum function along with rep function that will repeat the sum for rows and na.rm=TRUE to exclude the rows with missing values. For example, if we have a data ...
Read More
How to check if an R matrix column contains only duplicate values?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 11:53:10
To check if an R matrix column contains only duplicate values, we can use dim function for the dimension of the column after accessing the matrix column with table function. For example, if we have a matrix called M having five columns then we can check whether first column contains ...
Read More
How to find the number of levels in R for a factor column?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 11:49:54
To find the number of levels in R for a factor column, we can use length function along with unique function. For example, if we have a data frame called df that contains a factor column X then we can find the number of levels in the factor column using ...
Read More
How to replace space between two words with underscore in an R data frame column?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 11:45:14
To replace space between two words with underscore in an R data frame column, we can use gsub function. For example, if we have a data frame called df that contains character column x having two words having a single space between them then we can replace that space using ...
Read More
How to find the standard deviation for rows in an R data frame?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 11:39:52
To find the standard deviation for rows in an R data frame, we can use mutate function of dplyr package and rowSds function of matrixStats package. For example, if we have a data frame called df that contains two columns x and y then we can find the standard deviation ...
Read More
How to find the correlation between corresponding columns of two matrices in R?
R Programming
Server Side Programming
Programming
Nizamuddin Siddiqui
Published on 17-Mar-2021 11:30:52
To find the correlation between corresponding columns of two matrices, we can use mapply function but we will have to read the matrices using as.data.frame function. For example, if we have two matrices called M_1 and M_2 and each of these matrices contains 5 columns then the correlation between corresponding ...
Read More
1
2
3
4
5
6
7
...
149
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout