selection_for_area: selection_for_area

Description Usage Arguments Details Value Author(s) Examples

View source: R/sms.R

Description

Make a single selection of individual records for a census area.

Usage

1
selection_for_area(inpanel, area_census, inlexicon)

Arguments

inpanel

The panel dataset

area_census

A census area

inlexicon

A data lexicon showing the variable associations.

Details

Select a number of individual records from panel dataset, to represent a census description of an area.

Value

list A list of results (#areaid, #selection, #error)

Author(s)

Dimitris Kavroudakis dimitris123@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(sms)
data(survey) #load the data
data(census)
in.lexicon=createLexicon() # Create a data lexicon for holding the associated column names.
in.lexicon=addDataAssociation(in.lexicon, c("he","he"))
in.lexicon=addDataAssociation(in.lexicon, c("females","female"))

# Select the first area from the census table
this_area=as.data.frame(census[1,]) 

#make a representation for this area.
sel=selection_for_area(survey, this_area, in.lexicon) 

print(sel) #print the representation

sms documentation built on May 1, 2019, 8:18 p.m.