I have csv with a set of cars in R. How do I set up the data to where one group contains three specific cars, and the other group is the rest of the cars? I have tried
carA=someintervalvariable[car=="carA"]
carB=someintervalvariable[car=="carB"]
carC=someintervalvariable[car=="carC"]
ABC=which(c("A","B","C"))
others=someintervalvariable[-ABC]
AND
group1 <- data$car["carA","carB","carC"]
I am stuck. I don't know how to collect those three cars while keeping the other cars in a different set. I would like to run tests on those cars vs. the other cars with ratio and interval data. How do i save them separately?
Here is an example of my data:
car mpg satisfaction
carA:1 Min. :12.00 Min. :0.2000
carB:1 1st Qu.:21.00 1st Qu.:0.3850
carC:1 Median :23.00 Median :0.5600
carD:1 Mean :22.43 Mean :0.5386
carE:1 3rd Qu.:24.50 3rd Qu.:0.7150
carF:1 Max. :31.00 Max. :0.8100
carG:1