We can use R programming to detect anomalies in a dataset. Anomaly detection can be used in a number of different areas, such as intrusion detection, fraud detection, system health, and so on. In R programming, these are called outliers. R programming allows the detection of outliers in a number of ways, as listed here:
R programming has a function to display outliers:
boxplot function produces a box-and-whisker plot (see following graph). The
boxplot function has a number of graphics options. For this example, we do not need to set any.