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

Move columns from a data frame below other columns in R

$
0
0

I have a data frame with 4 columns and 20 rows. I would like to move the last two columns to be below the other two, resulting in 2 columns and 40 rows. Is there any function in R so that I can select as argument the value of columns I want to move (2) without being manually? I ask this because I need it in a for loop. Thanks.


Viewing all articles
Browse latest Browse all 201839

Trending Articles



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