I am calculating a linear regression between an age (numeric) vector and a date (POSIXct) vector. What is the most convenient way to transform the date so that cor is happy with it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As mentionned in @Chase’s comment, you can use directly your dates in
corif you transform them into numeric objects withas.numeric.