Question: # 1 . Create a variable called x and assign the text This is my first assignment to it . Hint: use -

#1. Create a variable called x and assign the text "This is my first assignment" to it.
Hint: use "-" to assign a variable to the text.
# 2. Add the text "and I'm loving it!" to the same variable that you just created.
Hint: you may use paste() function. Type help(paste) in arind execute to get some help.
# 3. Create a vector called Y with the numbers 2,3,4, and 5. Next, multiply the vector by 2 and save it as Y again.
# 4. Print both the variable (x) and the vector (Y).
# 5. Show the maximum and the minimum value of the vector Y that you created.
# 6. Load up the ggplot2 package and take a look at the first six rows of the data called, "economics," which is available with the package.
Hint: For this task, just type the three lines below.
install.packages("ggplot2") # if you have already installed the package before, you don't need to run this code again. library(ggplot2)
head(economics)
# 7. Use the data set "economics" and draw a line plot of the total population (pop) against time (date). Assign "plot" to the code that produced the chart.
Hint: display "pop" on the y-axis and "date" on the x-axis.
# 8. Using the function "labs()," specify what should be the title and labels for the x-axis and y-axis.
Hint: you might add this specification to the plot generated in #7.
# 1 . Create a variable called x and assign the

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 Programming Questions!