collapse_PCS2003_2l: The collapsing of the French Professions et Categories...

Description Usage Arguments Author(s) References Examples

View source: R/collapse_PCS2003_2l.R

Description

This function collapses the French Professions et Categories Socioprofessionnelles (PCS 2003) from 2 levels (niveau 2) into 1 level (niveau 1)

Usage

1

Arguments

PCS2003_2l

The name of the variable containing the French PCS 2003 coded on 2 levels

data

The name of the dataset

Author(s)

Julie Falcon (University of Lausanne)

References

Documentation on the French Professions et Categories Socioprofessionnelles (PCS) 2003 can be found on the French National Statistic Agency, the INSEE (in French only):

http://insee.fr/fr/methodes/default.asp?page=nomenclatures/pcs2003/pcs2003.htm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#load the data
data(data_PCS2003_2l)

#visualize the data
str(data_PCS2003_2l)
head(data_PCS2003_2l)

#check the variable PCS2003_2l needed for the conversion
table(data_PCS2003_2l$codes_2_level)

#Then, you can run the function:
data_PCS2003_2l <- collapse_PCS2003_2l(
				   PCS2003_2l=data_PCS2003_2l$codes_2_level,
				   data=data_PCS2003_2l)

#The corresponding variable was created:
names(data_PCS2003_2l)
table(data_PCS2003_2l$PCS2003_1l)

SocialPosition documentation built on May 2, 2019, 9:25 a.m.