Learn R Programming

benford.analysis (version 0.1.5)

getDigits: Gets the data starting with some specific digits

Description

It subsets the original data according to the leading digits.

Usage

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

Run this code
# NOT RUN {
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)) 
# }

Run the code above in your browser using DataLab