Answered step by step
Verified Expert Solution
Link Copied!

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.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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

What are negative messages? (Objective 1)

Answered: 1 week ago