Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 Keep it simple and only use code that appears on p of the textbook. All you need to accomplish this task are the following lines of code youll need to modify them:
# set the date on which to calculate your age
startingDate asDateYYYYMMDD
# 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 and write a comment to answer the question of how old you are on the specific date in both DAYS and YEARS. Using the asDate 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started