Description Usage Arguments Details Author(s) See Also Examples

View source: R/plotNA.distribution.R

Visualize the distribution of missing values within a time series.

1 2 3 4 | ```
plotNA.distribution(x, colPoints = "steelblue",
colBackgroundMV = "indianred2", main = "Distribution of NAs",
xlab = "Time", ylab = "Value", pch = 20, cexPoints = 0.8,
col = "black", ...)
``` |

`x` |
Numeric Vector ( |

`colPoints` |
Color of the points for each observation |

`colBackgroundMV` |
Color for the background for the NA sequences |

`main` |
Main label for the plot |

`xlab` |
Label for x axis of the plot |

`ylab` |
Label for y axis of plot |

`pch` |
Plotting 'character', i.e., symbol to use. |

`cexPoints` |
character (or symbol) expansion: a numerical vector. |

`col` |
Color for the lines. |

`...` |
Additional graphical parameters that can be passed through to plot |

This function visualizes the distribution of missing values within a time series. Therefore, the time series is plotted and whenever a value is NA the background is colored differently. This gives a nice overview, where in the time series most of the missing values occur.

Steffen Moritz

`plotNA.distributionBar`

,
`plotNA.gapsize`

, `plotNA.imputations`

1 2 3 4 5 6 7 8 9 10 | ```
#Example 1: Visualize the missing values in x
x <- ts(c(1:11, 4:9,NA,NA,NA,11:15,7:15,15:6,NA,NA,2:5,3:7))
plotNA.distribution(x)
#Example 2: Visualize the missing values in tsAirgap time series
plotNA.distribution(tsAirgap)
#Example 3: Same as example 1, just written with pipe operator
x <- ts(c(1:11, 4:9,NA,NA,NA,11:15,7:15,15:6,NA,NA,2:5,3:7))
x %>% plotNA.distribution
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.