R/plot_relationships.R
pr_plot_scatter.Rd
Note that this function assumes wide data with the data to plot as columns.
pr_plot_scatter(df, x, y, Trend = "none")
ggplot object
df <- planktonr::pr_get_NRSMicro() %>%
tidyr::drop_na(tidyselect::all_of(c("Values", "Parameters"))) %>%
dplyr::filter(StationCode %in% c("NSI", "PHB")) %>%
tidyr::pivot_wider(names_from = "Parameters", values_from = "Values", values_fn = mean)
#> Rows: 6562 Columns: 157
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (4): code, TripCode, StationName, StationCode
#> dbl (151): TripCode_depth, Longitude, Latitude, Year, Month, Day, Silicate_...
#> dttm (1): SampleDateUTC
#> time (1): Time_24hr
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
gg <- pr_plot_scatter(df, "Bacterial_Temperature_Index_KD",
"nitrogen_fixation_organisms", Trend = 'none')