plot_time {vDiveR} | R Documentation |
Time Distribution of Sequences Plot
Description
This function plots the time distribution of provided sequences in the form of bar plot with 'Month' as x-axis and 'Number of Sequences' as y-axis. Aside from the plot, this function also returns a dataframe with 2 columns: 'Date' and 'Number of sequences'. The input dataframe of this function is obtainable from metadata_extraction(), with NCBI Protein / GISAID EpiCoV FASTA file as input.
Usage
plot_time(
metadata,
date_format = "%Y-%m-%d",
base_size = 8,
date_break = "2 month",
scale = "count",
only_plot = F
)
Arguments
metadata |
a dataframe with 3 columns, 'ID', 'country', and 'date' |
date_format |
date format of the input dataframe |
base_size |
word size in plot |
date_break |
date break for the scale_x_date |
scale |
plot counts or log scale the data |
only_plot |
logical, return only plot or dataframe info as well, default FALSE |
Value
A single plot or a list with 2 elements (a plot followed by a dataframe, default)
Examples
time_plot <- plot_time(metadata)$plot
time_df <- plot_time(metadata)$df
[Package vDiveR version 1.2.1 Index]