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

Turning a row slice into a dataset

$
0
0

I am trying to make new datasets from an existing dataset. I want to split it by selecting specific rows to go in each dataset. I have managed to slice out the data I want using my.data %<% slice(). I have tried to create a new data frame using this format:

 ed_exp1 <- education[c(10:21),c(2,6:7)]

but I keep getting this error:

Error: Positive column indexes in `[` must match number of columns:
* `.data` has 8 columns.

How do I go about naming this slice/turning it into a dataset that I can do further analysis on?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



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