1. R 프로그램에 내장된 데이터 세트 mtcars에서 실린더의 종류가 자동차 연비에 미치는 영향을 알아보려 합니다. 종속변수와 독립변수는 무엇인가요?

The dependent variable is 자동차 연비 and The independent variable is 실린더의 종류

2. 데이터 mtcars의 구조를 행렬로 나타내 보세요?

using as.matrix()

as.matrix(mtcars)

3. 데이터 mtcars를 구성하는 feature(=the number of column)는 총 몇 개 인가요?

using ncol()

ncol(mtcars)

4. 데이터 mtcars 구성 feature의 특징을 알아봅니다(str(=column) 함수 사용)

str(mtcars)

5. 내장 데이터 iris(이미 내장되어 있음)를 불러옵니다. Sepal.Length, Sepal.width, Petal.Length, Petal.Width 관측치를 이용하여 iris 꽃의 품종(Species)를 예측하려 합니다. 그러면, 독립변수와 종속변수는 무엇이 될까요?

The dependent variable is the species and the independent variable is sepal length, sepal width, petal length, and petal width

data(iris)

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.