Learn R Programming

phenofit (version 0.2.0)

melt_list: melt_list

Description

melt_list

Usage

melt_list(list, var.name, na.rm = TRUE, ...)

Arguments

list

Data set to melt

var.name

list names convert into var.name

na.rm

Should NA values be removed from the data set? This will convert explicit missings to implicit missings.

...

other parameters to melt.

Examples

Run this code
# NOT RUN {
# data.frame
df <- data.frame(year = 2010, day = 1:3, month = 1, site = "A")
l  <- list(a = df, b = df)
df_new <- melt_list(l, "id")

# data.table
df <- data.table::data.table(year = 2010, day = 1:3, month = 1, site = "A")
l  <- list(a = df, b = df)
df_new <- melt_list(l, "id")
# }

Run the code above in your browser using DataLab