melt_date: melt data frame by date

View source: R/R ez.R

melt_dateR Documentation

melt data frame by date

Description

This function returns a data frame in long format, where the dates are completed from start to end by some id.

Usage

melt_date(data, start, end, id)

Arguments

data

Object of type dataframe

start

date type value

end

date type value

id

Character value that will be used as id to melt the data frame from start to end by dates

Examples

data_example = data.frame(id = c(1, 2),
start = as.Date(c("2021-01-01", "2021-01-10")),
end = as.Date(c("2021-01-10", "2021-01-15")))
melt_date(data = data_example, start = start, end = end, id = id)

bfernandez2/ezR documentation built on April 4, 2022, 1:54 p.m.