1. How many cases were included in the data?
data = iris
nrow(data)
## [1] 150

There are 150 cases included in data.

  1. How many numerical variables are included in the data? Indicate what they are, and if they are continuous or discrete.
num = unlist(lapply(data,is.numeric))
print(num)
## Sepal.Length  Sepal.Width Petal.Length  Petal.Width      Species 
##         TRUE         TRUE         TRUE         TRUE        FALSE

There are four variables in the data. sepal length, sepal width, petal length, petal width that are continuous.

  1. How many categorical variables are included in the data, and what are they? List the corresponding levels (categories).
cat1 = unlist(lapply(data,is.factor))
print(cat1)
## Sepal.Length  Sepal.Width Petal.Length  Petal.Width      Species 
##        FALSE        FALSE        FALSE        FALSE         TRUE

There is 1 categorical variable i.e species.

# list the corresponding levels
level <- unique(iris$Species)
level
## [1] setosa     versicolor virginica 
## Levels: setosa versicolor virginica

There are three levels i.e Setosa, Versicolor and virginica.