Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 209039

R question. Generate variables followed by number suffix in dataframe [duplicate]

$
0
0

How do I generate a variables as below by just entering a number into a function (in this case 5)?

  rank  DATE  OP
1    1 DATE1 OP1
2    2 DATE2 OP2
3    3 DATE3 OP3
4    4 DATE4 OP4
5    5 DATE5 OP5
> 

Which is the easiest way?


Viewing all articles
Browse latest Browse all 209039

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>