Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi - In R, I'm trying to convert the three columns (Year, Month, Day) to the format Day-Month-Year. I keep getting the following error so
Hi - In R, I'm trying to convert the three columns (Year, Month, Day) to the format Day-Month-Year. I keep getting the following error so would love to know what the correct R code is. Thanks
> head(weather) Year Month Day Rainfall Temp 1 2013 7 1 0.0 23.0 2 2013 7 2 0.0 22.1 3 2013 7 3 3.2 17.2 4 2013 7 4 2.0 16.8 5 2013 7 5 0.0 17.4 6 2013 7 6 0.0 17.3 > weather$date <- make_date(weather$year,weather$month, weather$day) Error in `$<-.data.frame`(`*tmp*`, "date", value = numeric(0)) : replacement has 0 rows, data has 365
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