Description Usage Arguments Value See Also Examples
View source: R/hello.R View source: R/code_package.r View source: R/code_package.R
Convert income/wealth data into a datafrane that can be used with TopShare
or Pareto_diagram
1 | tidy_income(income, weights)
|
income |
a vector of data (income or wealth) |
weights |
a vector of weight (same length as |
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)
Top_Share
, Pareto_diagram
, Table_Top_Share
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.