Question: PLEASE ANSWER using R studio . VARIABLE ASSIGNMENT AND SIMPLE FUNCTIONS ## ######################################################### #Section 2 instructions: #Answer the following questions by defining the provided objects.
PLEASE ANSWER using R studio .
VARIABLE ASSIGNMENT AND SIMPLE FUNCTIONS ## #########################################################
#Section 2 instructions: #Answer the following questions by defining the provided objects.
#Question 2.1 (2 points) #Create a numeric vector that contains all integers between 1 and 1,000 (inclusive) aS2Q1 <-
#Question 2.2 (2 points) #Create a numeric vector that contains all even integers between 2 and 1,000 (inclusive) aS2Q2 <-
#Question 2.3 (2 points) #Four strings are defined as character vectors below. Using the already defined #character vectors, create a single character vector that combines all of them #and separates the contents of each with a comma followed by a space. str1 <- "The National Mall in Washington" str2 <- "D.C. has monuments" str3 <- "museums" str4 <- "and scenery that draws many tourists from around the world."
aS2Q3 <-
#Question 2.4 (2 points) #Translate the following mathematical function into an R function named "zFunction": z = (x + x^2 + x^3) - (y + y^2 + y^3) #Then, evaluate for (x, y) = (3, 4) and save your answer to the provided object.
zFunction <- aS2Q4 <-
#Question 2.5 (2 points) #Create a four-element list where each element is your answer to questions 2.1-2.4. #Name the four elements ans1, ans2, ans3, and ans4 aS2Q5 <-
#Question 2.6 (2 points) #Display the element ans3 from the list created in question 2.5 using two different methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
