Description Usage Arguments Value Examples
View source: R/gdpdescriberr.R
GDP describerr Calculates summary statistics for the Numeric Variable x grouping by categorical variable y. The function is able to calculate the following descriptive statistics: Mean Median Standard Deviation Minimum Value Maximum Value Range Value of 75th percentile Value of 25th percentile Interquartile range Number of Missing values
1 | gdpdescriberr(df1, x, y, .stats = c("mean", "sd", "median"), dec = 2)
|
df1 |
cleaned data frame preprocessed by gdpcleanerr |
x |
column name of a data frame used to calculate the descriptive statistics |
y |
column name of a grouping variable |
.stats |
vector with the descriptive stats to calculate |
dec |
number of decimal places to return in the table |
data.frame
1 2 3 4 5 6 7 8 9 | data <- tibble::tribble(~REF_DATE,~GEO,~DGUID,
~`North.American.Industry.Classification.System.(NAICS)`,
~UOM, ~UOM_ID,~SCALAR_FACTOR,~SCALAR_ID,~VECTOR, ~COORDINATE,
~VALUE,~STATUS,~SYMBOL,~TERMINATED,~DECIMALS,1997L,"Canada",
"2016A000011124","Total industries", "Dollars",81L,"millions",
6L, "v41894235",1.477, 816756.1, NA,NA, NA,1L,1997L,"Canada",
"2016A000011124", "Crop and animal production",
"Dollars",81L,"millions",6L,"v41700857", 1.1,12755.9,NA,NA, NA,1L)
gdpdescriberr(data, VALUE, GEO, .stats=c("mean", "sd", "median"), dec = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.