tidy_income: tidy_income

Description Usage Arguments Value See Also Examples

View source: R/hello.R View source: R/code_package.r View source: R/code_package.R

Description

Convert income/wealth data into a datafrane that can be used with TopShare or Pareto_diagram

Usage

1

Arguments

income

a vector of data (income or wealth)

weights

a vector of weight (same length as income

Value

a dataframe with 4 columns, y the vector income (or wealth), weights the vector of weights, Fw the cumulated proportion of people (with weights) and Fx the cumulated proportion of people (without weights)

See Also

Top_Share, Pareto_diagram, Table_Top_Share

Examples

1
2
3
4
url_1 <- "https://github.com/freakonometrics/TopIncome/raw/master/data_csv/dataframe_yw_1.csv"
df <- read.table(url_1,sep=";",header=TRUE)
data_1  <-  tidy_income(income = df$y, weights = df$w)
str(data_1)

freakonometrics/TopIncome documentation built on Oct. 16, 2021, 5:58 p.m.