plot_sample_space_time {ecocomDP} | R Documentation |
Plot dates and times samples were collected or observations were made
Description
Plot dates and times samples were collected or observations were made
Usage
plot_sample_space_time(
data,
id = NA_character_,
alpha = 1,
color_var = "package_id",
shape_var = "package_id",
observation = NULL
)
Arguments
data |
(list or tbl_df, tbl, data.frame) The dataset object returned by |
id |
(character) Identifier of dataset to be used in plot subtitles. Is automatically assigned when |
alpha |
(numeric) Alpha-transparency scale of data points. Useful when many data points overlap. Allowed values are between 0 and 1, where 1 is 100% opaque. Default is 1. |
color_var |
(character) Name of column to use to assign colors to the points on the plot |
shape_var |
(character) Name of column to use to assign shapes to the points on the plot |
observation |
(tbl_df, tbl, data.frame) DEPRECATED: Use |
Details
The data
parameter accepts a range of input types but ultimately requires the 9 columns of the observation table.
Value
(gg, ggplot) A gg, ggplot object if assigned to a variable, otherwise a plot to your active graphics device
Examples
## Not run:
# Read a dataset of interest
dataset <- read_data("edi.193.5")
# Plot the dataset
plot_sample_space_time(dataset)
# Flatten the dataset, manipulate, then plot
dataset %>%
flatten_data() %>%
dplyr::filter(lubridate::as_date(datetime) > "2003-07-01") %>%
dplyr::filter(as.numeric(location_id) > 4) %>%
plot_sample_space_time()
## End(Not run)
# Plot the example dataset
plot_sample_space_time(ants_L1)