Author: saqibkhan
-
What is a package in R, and how do you install and load packages?
An R package is a collection of functions, code, data, and documentation, representing an extension of the R programming language and designed for solving specific kinds of tasks. R comes with a bunch of preinstalled packages, and other packages can be installed by users from repositories. The most popular centralized repository storing thousands of various…
-
How to import data in R?
The base R provides essential functions for importing data: In practice, any of these functions can be used to import tabular data with any kind of field and decimal separators: using them for the specified formats of files is only the question of convention and default settings. For example, here is the syntax of the…
-
What is R, and what are its main characteristics?
R is a programming language and environment widely used for solving data science problems and particularly designed for statistical computing and data visualization. Its main characteristics include:
-
Chi Square Test
Chi-Square test is a statistical method to determine if two categorical variables have a significant correlation between them. Both those variables should be from same population and they should be categorical like − Yes/No, Male/Female, Red/Green etc. For example, we can build a data set with observations on people’s ice-cream buying pattern and try to correlate…
-
Survival Analysis
Survival analysis deals with predicting the time when a specific event is going to occur. It is also known as failure time analysis or analysis of time to death. For example predicting the number of days a person with cancer will survive or predicting the time when a mechanical system is going to fail. The…
-
Random Forest
In the random forest approach, a large number of decision trees are created. Every observation is fed into every decision tree. The most common outcome for each observation is used as the final output. A new observation is fed into all the trees and taking a majority vote for each classification model. An error estimate…
-
Decision Tree
Decision tree is a graph to represent choices and their results in form of a tree. The nodes in the graph represent an event or choice and the edges of the graph represent the decision rules or conditions. It is mostly used in Machine Learning and Data Mining applications using R. Examples of use of…