
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 33676 Articles for Programming

1K+ Views
To find the confusion matrix for linear discriminant analysis in R, we can follow the below steps −First of all, create a data frame.Create new features using linear discriminant analysis.Find the confusion matrix for linear discriminant analysis using table and predict function.Create the data frameLet's create a data frame as shown below − Live DemoGroup

174 Views
To apply different function to grouping values in an R data frame, we can follow the below steps −First of all, create a data frame.Then, use ifelse function to apply different function to grouping values.Create the data frameLet's create a data frame as shown below − Live Demox

768 Views
To find the starting position for consecutive values given the length of consecutive values in an R vector, we can follow the below steps −First of all, create a vector with duplicated values.Find the run length.Create a vector with FALSE of vector size.Find the starting position by setting running length of consecutive values to TRUE for given length.Create the vectorLet’s create a vector having many duplciates so that we can get same consecutive values − Live Demox

968 Views
To find the unique elements in multiple vectors, we can follow the below steps −First of all, create a number of vectors.Use setdiff function to find the common elements in all the vectors.Create the vectorsLet’s create a number of vectors as shown below − Live Demox

880 Views
To find the common elements in multiple vectors, we can follow the below steps −First of all, create a number of vectors.Use intersect function to find the common elements in all the vectors.Create the vectorsLet’s create a number of vectors as shown below − Live Demox

204 Views
To set the nuber of digits to be printed for summary command without using options(digits), we can use digits argument while printing the summary. −Example 1Using mtcars data and finding the summary statistics with number of digits set to 2 − Live Demosummary(mtcars, digits=2)On executing, the above script generates the below output(this output will vary on your system due to randomization) −Output mpg cyl disp hp drat Min. :10 Min. :4.0 Min. : 71 Min. ... Read More
How to find the number of rows in a data.table where two or more column values meet a criteria in R?

448 Views
To find the number of rows in a data.table where two or more column values meet a criteria, we can follow the below steps −First of all, create a data.table object.Find the number of rows meeting a criteria.Create data.table objectLet’s create a data.table object as shown below −x