Let's say I have one data frame named MLTXZP
that looks like this:
1 0.00038 0.75053 0.50 35 6000 0.75346
2 0.00038 0.75053 0.50 35 6050 0.72079
3 0.00038 0.75053 0.50 35 6100 0.69229
4 0.00038 0.75053 0.50 35 6150 0.66689
5 0.00038 0.75053 0.50 35 6200 0.64382
...
7247 0.00061 0.74996 0.80 105 6800 0.61635
and another data frame named populations
that looks like this. Note that the second column is either 0
or 1
.
1 1
2 1
3 1
4 1
5 1
...
7247 1
Notice how the first column of both files are the same? I want to create two new data frames that are subsets of MLTXZP
. I want one data frame to be MLTXZP but only the rows which have the 0
tag from the second file. I want the other data frame to be MLTXZP but only the rows which have the 1
tag from the second file. Is there a great way to do this?
EDIT: Column names for MLTXZP
"model ID", "Z", "X", "M", "L", "T", "non-linear period"
Column names for populations
(I may rename this data frame`)
"model ID", "population num"