Hello, I've been given an assignment where I have to produce two data frames from the existing data given to me. The data frames are separated by the variable measuring English as a second language. For one being less than 10% and the other being greater than 10% in which both data frames will still examine the same variables e.g. test scores, average income and expenditure per student. Does anyone know how I can do this? I can do it for all n observations into one data frame but not for a segment of n observations.
If I'm understanding correctly, you have one large dataframe that you need to subset into two separate dataframes, correct? You can use
filter in the
dplyr package for this. Here's a helpful cheatsheet to get you started.
I mean is their anyway I can cut the existing data in to two separate pieces so I can examine each of them individually and then produce the data-frames I need.