Displaying 1 result from an estimated 1 matches for "5_2_2".
2013 Apr 20
2
creating dummy variables
Hello R-users,
The below is a snippet of my data:
fid crop year value
5_1_1 SWHE 1995 171
5_1_1 SWHE 1997 696
5_1_1 BARL 1996 114
5_1_1 BARL 1997 344
5_2_2 SWHE 1995 120
5_2_2 SWHE 1996 511
5_2_2 BARL 1996 239
5_2_2 BARL 1997 349
Here, I want to create dummy variables with the names of the content of a column 'crop' in a way that the new variable 'SWHE' would receive a value of 1 if the column 'crop' c...