Description Usage Arguments Author(s) References Examples
View source: R/collapse_PCS2003_4l.R
This function collapses the French Professions et Categories Socioprofessionnelles (PCS 2003) from 4 levels (niveau 4) into 1 level, 2 levels and 3 levels (niveaux 1, 2 and 3)
1 | collapse_PCS2003_4l(PCS2003_4l, data)
|
PCS2003_4l |
The name of the variable containing the French PCS 2003 coded on 4 levels (i.e. 3 digits followed by 1 letter, such as 226a) |
data |
The name of the dataset |
Julie Falcon (University of Lausanne)
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #load the data
data(data_PCS2003_4l)
#visualize the data
str(data_PCS2003_4l)
head(data_PCS2003_4l)
#check the variable PCS2003_4l needed for the conversion
table(data_PCS2003_4l$codes_4_level)
#Then, you can run the function:
data_PCS2003_4l <- collapse_PCS2003_4l(
PCS2003_4l=data_PCS2003_4l$codes_4_level,
data=data_PCS2003_4l)
#Three variables corresponding each to one different level of collapsing were created:
names(data_PCS2003_4l)
table(data_PCS2003_4l$PCS2003_3l) #3 level
table(data_PCS2003_4l$PCS2003_2l) #2 level
table(data_PCS2003_4l$PCS2003_1l) #1 level
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.