Hi all,
My data looks like the below and is at the individual level, wide (I want it to be wide).
var_name1 var_value1 var_name2 var_value2
pri_housing 0 pri_homeless 1
pri_housing 1 pri_homeless 1
I would like to make it such that the columns are actually the var_names (pri_housing, pri_homeless) and then the values in those columns are 0 or 1.
So more like
pri_housing pri_homeless
0 1
1 1
Suggestions on this? Thanks!
My data looks like the below and is at the individual level, wide (I want it to be wide).
var_name1 var_value1 var_name2 var_value2
pri_housing 0 pri_homeless 1
pri_housing 1 pri_homeless 1
I would like to make it such that the columns are actually the var_names (pri_housing, pri_homeless) and then the values in those columns are 0 or 1.
So more like
pri_housing pri_homeless
0 1
1 1
Suggestions on this? Thanks!
Comment