Conversation
dhicks
left a comment
There was a problem hiding this comment.
Reading your code quickly, it looks like you're doing things right, just not with the variables in the right place. See my longer comment w/ example.
| class(ri_df$StartDate) | ||
| #' The class of the "StartDate" column is "character". | ||
| #' The dates are formatted differently. Some dates refer to a certain day, and some some days are the days passed since a reference date. | ||
| ri_df_dates <- ri_df %>% |
There was a problem hiding this comment.
You're using different names for several variables, and Travis can't find them to check your work
| ri_df_dates <- ri_df %>% | |
| dates <- ri_df %>% |
| mutate(int_dates1= dates) %>% | ||
| mutate(int_dates1= as.integer(int_dates1)) %>% | ||
| mutate(int_dates1 = as.Date(int_dates1, origin='1899-12-30')) |
There was a problem hiding this comment.
Ahh I think I get where you're confused now. I'm asking you to create these variables in the environment, not within the dataframe. The idea is that it's easier to write a function that takes a single vector as input and apply it to a dataframe, rather than working directly with the whole dataframe.
There was a problem hiding this comment.
So for example, what I'm looking for here would look like
int_dates1 <- dates %>%
as.integer() %>%
as.Date(origin = '1899-12-30')
dhicks
left a comment
There was a problem hiding this comment.
Reading your code, it looks like you're doing things correctly, just saving them to variables in the wrong place. See my longer comment w/ example.
No description provided.