step_to_df: Extract declarations sections

Description Usage Arguments Details Examples

View source: R/edecl.R

Description

Extract specific sections of declarations into dataframe. For now - ignoring "rights" and "guarantor" subsections

Usage

1
2
step_to_df(decls, step, add_rights = FALSE, guarantor = FALSE,
  guarantor_realty = FALSE)

Arguments

step

Step (section) of declarations to be extracted. Works correctly if receives values between 2 and 16

add_rights

Logical. Should information on additional (not belonged to declarer or his family members) rights be saved? Default to FALSE.

guarantor_realty

Logical. Should information on loan guarantors' realty be saved? Defaults to FALSE.

d

Declarations set

guarantor.

Logical. Should information on loan guarantors be saved? Defaults to FALSE.

Details

The value is always list of 4 data frames. The data frames are available by names "data", "add_rights", "guarantor", "guarantor_realty". If corresponded parameters equal FALSE, these dataframes are always blank. If these parameters are set to TRUE, the function works slower.

Examples

1
2
3
4
library(dplyr)
mps2016_realty <- 
   download_declarations("народний депутат", declaration_year = "2016") %>% 
   step_to_df(3)$data

texty/edecl documentation built on May 29, 2019, 10:53 a.m.