Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R mtcars dataset, meaning of "vs" variable?

Tags:

r

dataset

What does the "vs" variable mean in the "mtcars" dataset in R? The helpfile says it means "V/S" but that is not enlightening.

Commands:

data(mtcars)
head(mtcars)
?mtcars
like image 967
ddunn801 Avatar asked Sep 04 '13 14:09

ddunn801


People also ask

What are the variables in Mtcars?

Using pairs(mtcars), we get that fuel consumption increases as the number of cylinders (cyl), displacement (disp), horsepower (hp), and weight (wt) increase. That is to say, as these variables increase, the Miles per gallon (MPG) of cars dereases.

How many variables are in the Mtcars dataset?

The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models). A data frame with 32 observations on 11 variables.

What does CYL mean in R?

CYL. The abbreviation stands for Cylinder. It represents the amount of lens power you need for astigmatism. If you do not have astigmatism, you may not have anything indicated in this column.

How many columns are in the Mtcars data frame?

What is this? We can see that the dataset has 32 rows and 11 columns.


2 Answers

I think it's whether the car has a V engine or a straight engine. I'm basing this on the foot note on the page numered 396 of http://www.mortality.org/INdb/2008/02/12/8/document.pdf

like image 68
GSee Avatar answered Oct 23 '22 16:10

GSee


Binary variable signaling the engine cylinder configuration as either:

V-shape (vs=0) or Straight Line (vs=1)

Configuration offers trade offs in power/torque, design usage in terms of space/size of engine and performance or center of gravity of vehicle. The geometry and placement of the engine, as influenced by its cylinder head, can have numerous knock-on influences on the vehicle beyond the technical engineering considerations of the cyliner angle.

like image 32
srikar mattapalli Avatar answered Oct 23 '22 15:10

srikar mattapalli