Reputation: 311
It seems to be a trivial question but i could not find out how to solve it.
Based on rownames of DF
i need to fill the column. If rowname=1
, column a=i
, otherwise do not fill with anything.
DF
a
2
4
1
4
I have tried if
statement and DF[rownames(DF)==1]<-i
, that did nothing. Thank you for any suggestion.
Upvotes: 2
Views: 557