Question: Based the Dates exercise ( Field , p . 8 8 ) in R , complete this problem either on DataCamp ( use any page

Based the Dates exercise (Field, p.88) in R, complete this problem either on DataCamp (use any page of the tutorial or create a new empty workspace) or RStudio. Calculate your age in DAYS as of January 10,2023. Keep it simple and only use code that appears on p.88 of the textbook. All you need to accomplish this task are the following lines of code (you'll need to modify them):
# set the date on which to calculate your age
startingDate <- as.Date("YYYY-MM-DD")
# set your birthday
myBirthday <-___
# calculate the difference between the two in YEARS, only using subtraction
difference <- startingDate myBirthday
# type the name of the variable you've created, which will then call R to print that variable
difference
# Convert your age into YEARS (divide by 365.25) and write a comment to answer the question of how old you are on the specific date in both DAYS and YEARS. Using the as.Date() function will default a response in days, so provide your answer as a comment with the correct units of measurement.
I will grade your R code by running it in R. To receive credit for this question, your code must execute properly with no additional code needed. Try it out before submitting.

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!