Skip to contents

This function pulls information from multiple dataframes to display everything about a cell (cell characteristics, evoked current data, and spontaneous current data) in an interactive table. The table is made with reactable::reactable(), so it can be filtered, sorted, and rearranged.

Usage

make_interactive_summary_table(
  cell_characteristics_dataframe,
  pruned_eEPSC_dataframe,
  pruned_sEPSC_dataframe,
  treatment_colour_theme,
  include_all_treatments = "yes",
  list_of_treatments = NULL,
  include_all_categories = "yes",
  list_of_categories = NULL,
  save_output_as_RDS = "no"
)

Arguments

cell_characteristics_dataframe

A dataframe containing the cell characteristics, generated from import_cell_characteristics_df().

pruned_eEPSC_dataframe

A dataframe containing pruned evoked current data, generated from make_pruned_EPSC_data(), where current_type == "eEPSC".

pruned_sEPSC_dataframe

A dataframe containing pruned spontaneous current data, generated from make_pruned_EPSC_data(), where current_type == "sEPSC".

treatment_colour_theme

A dataframe containing treatment names and their associated colours as hex values. See sample_treatment_names_and_colours for an example of what this dataframe should look like.

include_all_treatments

A character ("yes" or "no") specifying if the plot will include data from all treatments. If "no", you must specify a list of treatments in list_of_treatments.

list_of_treatments

A list of character values describing the treatments that will be in the plot. Defaults to NULL, since include_all_treatments is "yes" by default.

include_all_categories

A character ("yes" or "no") specifying if the plot will include data from all categories. If "no", you must specify a list of categories in list_of_categories.

list_of_categories

A list of character values describing the categories that will be in the plot. Defaults to NULL, since include_all_categories is "yes" by default.

save_output_as_RDS

A character ("yes" or "no") describing if the resulting object should be saved as an RDS file in the raw data folder. Note: This is not the interactive table, but it is the raw dataframe that is later inserted into reactable::reactable(). This is useful if you want to build your own table using a different package, or you want to generate a customized reactable table yourself.

Value

A reactable HTML widget that can be viewed in RStudio or exported in RMarkdown HTML documents. If save_output_as_RDS == "yes", the raw dataframe used to create the reactable is also exported as an .rds file into Data/Output-Data-from-R/.

Details

The table contains sparklines of the evoked current and spontaneous current amplitudes over time, which allows you to visually compare the overall response of a group of cells.

The sparklines are colour-coded by treatment, allowing you to quickly identify trends in response to a hormone/protocol for all cells belonging to a particular treatment.

Examples


make_interactive_summary_table(
  cell_characteristics_dataframe = sample_cell_characteristics,
  pruned_eEPSC_dataframe = sample_pruned_eEPSC_df,
  pruned_sEPSC_dataframe = sample_pruned_sEPSC_df,
  treatment_colour_theme = sample_treatment_names_and_colours,
  include_all_treatments = "yes",
  list_of_treatments = NULL,
  include_all_categories = "yes",
  list_of_categories = NULL,
  save_output_as_RDS = "no"
)
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'. 
#> Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(), p(), etc.), not objects of type 'shiny.tag.list'.