| as_lfq_data | R Documentation |
Generic function to convert various data formats into lfq_data objects. Methods can be defined for specific input classes to enable seamless interoperability with other genomic surveillance packages.
as_lfq_data(x, ...)
## S3 method for class 'lfq_data'
as_lfq_data(x, ...)
## S3 method for class 'data.frame'
as_lfq_data(x, ...)
x |
An object to coerce. |
... |
Additional arguments passed to methods. For the
|
An lfq_data object.
An lfq_data object.
An lfq_data object.
lfq_data() for the primary constructor.
df <- data.frame(
date = rep(as.Date("2024-01-01") + c(0, 7), each = 2),
lineage = rep(c("A", "B"), 2),
count = c(80, 20, 60, 40)
)
x <- as_lfq_data(df, lineage = lineage, date = date, count = count)
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.