0

I have this data.

OPENING
2007
2009
2004

I want to make the column format like this:

OPENING Y2004 Y2005 Y2006 Y2007 Y2008 Y2009
2007                        1    
2009                                    1
2004      1

It is possible to create this column step by step with if function, while I'd like to make loop or lapply function.

How do I use these functions?

Gregor Thomas
  • 119,032
  • 17
  • 152
  • 277
jhyeon
  • 465
  • 4
  • 14

0 Answers0