I want to rearrange a df with the function arrange
from dplyr
. The problem is that seems that these two packages have a conflict when I have another column (let's say v2) distinct from the column I want to arrange the df:
library(dplyr)
library(lubridate)
start_dates <- as.Date(1:10, origin = "2018-01-01")
my_df <- data.frame(x = 10:1, y = interval(start_dates, start_dates + 1),
z=c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J"))
my_df %>% arrange(z)
Error in arrange_impl(.data, dots) : Column
y
classes Period and Interval from lubridate are currently not supported.
How I can order my dataframe? Thank you in advanced.