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

beginner question: trying to subset the column names in my dataframe in R

$
0
0

I want the column names 2 through 9, and 18 through 25 and i tried:

colnames(df)[2:9,18:25] 

but it returns error of incorrect dimensions, how would i do this in a simple manner?


Viewing all articles
Browse latest Browse all 201894

Trending Articles



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