getDigits: Gets the data starting with some specific digits

Description Usage Arguments Value Examples

View source: R/get.functions.R

Description

It subsets the original data according to the leading digits.

Usage

1
getDigits(bfd, data, digits)

Arguments

bfd

an object of class "Benford". See benford.

data

the original data of the analysis.

digits

the first digits to get.

Value

The the original data starting only with the leading digits.

Examples

1
2
3
4
5
6
7
data(census.2000_2010) #gets data

#generates benford object
c2010 <- benford(census.2000_2010$pop.2010) 

#subsets data starting with digits 10 and 25
digits.10.25 <- getDigits(c2010, census.2000_2010, c(10,25)) 

carloscinelli/benford.analysis documentation built on Aug. 26, 2019, 8:08 a.m.