Question: 1 . Create four variables that are assigned a numeric data type, a character data type, a logical data type, and a date data type.

1. Create four variables that are assigned a numeric data type, a character data type, a logical
data type, and a date data type. Each variable should contain a different data type than the
others.
a. Validate the type of data contained in the variable using the appropriate function that
validates the class of the variable. (HINT: Read section 4.3 in the book)
2. Create a variable called "monthsOfYEAR" that contains a vector of the names of the days of
the week.
3. Create a variable called "dataVec1" that contains a vector of numbers that range from 100 to
120.
4. Create a variable called " dataVec2" that contains a vector of numbers that range from 50 to
70.
5. Create a variable called " datacombVec1" that adds the vectors of " dataVec1" and "
dataVec2" into the new variable " datacombVec1".
6. Create a variable called " datacombVec2" that multiplies the vectors of " dataVec1" and "
dataVec2" into the new variable " datacombVec2".
7. Whats the difference between NULL and NA? How can NAs be resolved when using the
sum command?
8. Write out the code that you would type in the RStudio script editor to install and load the
package dplyr.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!