perc_complete: Compute the percentage of data complete within a dataframe

perc_completeR Documentation

Compute the percentage of data complete within a dataframe

Description

Often it is relevant to compute the percentage of data complete in a dataframe to have an idea of the quality of the data. This is specially important for weather data where climate databases often have missing days. This function only works for dataframes. For lists, see details.

Usage

perc_complete(x)

Arguments

x

a dataframe normally produced through weather functions retrieving climate data. However, this is also possible to use with any dataframe.

Details

For list of dataframes, it is useful to combine this function with lapply. The output is a dataframe containing two columns (variable and percentage) and rows equal to the number of columns in the input dataframe.

Examples


df <- data.frame(year = rep(2011, 5),
                 month = rep(1, 5),
                 day = seq(1, 5),
                 Tmin = c(10, 12, 11, NA, 21))
                 
perc_complete(df)           


EduardoFernandezC/dormancyR documentation built on Aug. 24, 2022, 7:21 a.m.