Title: | Easy Use of R via Shiny App for Basic Analyses of Experimental Data |
---|---|
Description: | Runs a Shiny App in the local machine for basic statistical and graphical analyses. The point-and-click interface of Shiny App enables obtaining the same analysis outputs (e.g., plots and tables) more quickly, as compared with typing the required code in R, especially for users without much experience or expertise with coding. Examples of possible analyses include tabulating descriptive statistics for a variable, creating histograms by experimental groups, and creating a scatter plot and calculating the correlation between two variables. |
Authors: | Jin Kim [aut, cre] |
Maintainer: | Jin Kim <[email protected]> |
License: | GPL-3 |
Version: | 0.1.8 |
Built: | 2024-11-06 03:11:36 UTC |
Source: | https://github.com/jinkim3/ezr |
Returns descriptive statistics for a numeric vector.
desc_stats(vector = NULL, notify_na_count = NULL)
desc_stats(vector = NULL, notify_na_count = NULL)
vector |
a numeric vector |
notify_na_count |
if |
a named numeric vector
desc_stats(1:100) desc_stats(c(1:100, NA))
desc_stats(1:100) desc_stats(c(1:100, NA))
Creates histograms by group to compare distributions
histogram_by_group( data = NULL, iv_name = NULL, dv_name = NULL, order_of_groups_top_to_bot = NULL, number_of_bins = 40, space_between_histograms = 0.15 )
histogram_by_group( data = NULL, iv_name = NULL, dv_name = NULL, order_of_groups_top_to_bot = NULL, number_of_bins = 40, space_between_histograms = 0.15 )
data |
a data object (a data frame or a data.table) |
iv_name |
name of the independent variable |
dv_name |
name of the dependent variable |
order_of_groups_top_to_bot |
a character vector indicating the desired presentation order of levels in the independent variable (from the top to bottom). Omitting a group in this argument will remove the group in the set of histograms. |
number_of_bins |
number of bins for the histograms (default = 40) |
space_between_histograms |
space between histograms (minimum = 0, maximum = 1, default = 0.15) |
a ggplot object
histogram_by_group(data = mtcars, iv_name = "cyl", dv_name = "mpg") histogram_by_group(data = mtcars, iv_name = "cyl", dv_name = "mpg", order_of_groups_top_to_bot = c("8", "4"), number_of_bins = 10, space_between_histograms = 0.5)
histogram_by_group(data = mtcars, iv_name = "cyl", dv_name = "mpg") histogram_by_group(data = mtcars, iv_name = "cyl", dv_name = "mpg", order_of_groups_top_to_bot = c("8", "4"), number_of_bins = 10, space_between_histograms = 0.5)
Pretty round p-value
pretty_round_p_value( p_value_vector = NULL, round_digits_after_decimal = 3, include_p_equals = FALSE )
pretty_round_p_value( p_value_vector = NULL, round_digits_after_decimal = 3, include_p_equals = FALSE )
p_value_vector |
one number or a numeric vector |
round_digits_after_decimal |
round to nth digit after decimal |
include_p_equals |
if |
pretty_round_p_value(p_value_vector = 0.049, round_digits_after_decimal = 2, include_p_equals = FALSE) pretty_round_p_value(c(0.0015, 0.0014), include_p_equals = TRUE)
pretty_round_p_value(p_value_vector = 0.049, round_digits_after_decimal = 2, include_p_equals = FALSE) pretty_round_p_value(c(0.0015, 0.0014), include_p_equals = TRUE)
Creates a scatter plot and calculates a correlation between two variables
scatterplot( data = NULL, x_var_name = NULL, y_var_name = NULL, point_label_var_name = NULL, weight_var_name = NULL, alpha = 1, annotate_stats = FALSE, line_of_fit_type = "lm", ci_for_line_of_fit = FALSE, x_axis_label = NULL, y_axis_label = NULL, point_labels_size_range = c(3, 12), jitter_x_percent = 0, jitter_y_percent = 0 )
scatterplot( data = NULL, x_var_name = NULL, y_var_name = NULL, point_label_var_name = NULL, weight_var_name = NULL, alpha = 1, annotate_stats = FALSE, line_of_fit_type = "lm", ci_for_line_of_fit = FALSE, x_axis_label = NULL, y_axis_label = NULL, point_labels_size_range = c(3, 12), jitter_x_percent = 0, jitter_y_percent = 0 )
data |
a data object (a data frame or a data.table) |
x_var_name |
name of the variable that will go on the x axis |
y_var_name |
name of the variable that will go on the y axis |
point_label_var_name |
name of the variable that will be used to label individual observations |
weight_var_name |
name of the variable by which to weight the individual observations for calculating correlation and plotting the line of fit |
alpha |
opacity of the dots (0 = completely transparent, 1 = completely opaque) |
annotate_stats |
if |
line_of_fit_type |
if |
ci_for_line_of_fit |
if |
x_axis_label |
alternative label for the x axis |
y_axis_label |
alternative label for the y axis |
point_labels_size_range |
minimum and maximum size for dots on the plot when they are weighted |
jitter_x_percent |
horizontally jitter dots by a percentage of the range of x values |
jitter_y_percent |
vertically jitter dots by a percentage of the range of y values |
a ggplot object
scatterplot(data = mtcars, x_var_name = "wt", y_var_name = "mpg") scatterplot(data = mtcars, x_var_name = "wt", y_var_name = "mpg", point_label_var_name = "hp", weight_var_name = "drat", annotate_stats = TRUE) scatterplot(data = mtcars, x_var_name = "wt", y_var_name = "mpg", point_label_var_name = "hp", weight_var_name = "cyl", annotate_stats = TRUE)
scatterplot(data = mtcars, x_var_name = "wt", y_var_name = "mpg") scatterplot(data = mtcars, x_var_name = "wt", y_var_name = "mpg", point_label_var_name = "hp", weight_var_name = "drat", annotate_stats = TRUE) scatterplot(data = mtcars, x_var_name = "wt", y_var_name = "mpg", point_label_var_name = "hp", weight_var_name = "cyl", annotate_stats = TRUE)
Standard error of the mean
se_of_mean(vector, na.rm = TRUE, notify_na_count = NULL)
se_of_mean(vector, na.rm = TRUE, notify_na_count = NULL)
vector |
a numeric vector |
na.rm |
if |
notify_na_count |
if |
se_of_mean(c(1:10, NA))
se_of_mean(c(1:10, NA))
Starts the ezr program on the local machine
start_ezr( data_for_ezr = NULL, sigfig = 3, select_list_max = 1e+05, ezr_saved_analysis_file_name = "ezr_saved_analysis.csv", ezr_run_analysis_file_name = "ezr_run_analysis.csv" )
start_ezr( data_for_ezr = NULL, sigfig = 3, select_list_max = 1e+05, ezr_saved_analysis_file_name = "ezr_saved_analysis.csv", ezr_run_analysis_file_name = "ezr_run_analysis.csv" )
data_for_ezr |
a data object (a data frame or a data.table) |
sigfig |
number of significant digits to round to |
select_list_max |
maximum number of variable names to display for dropdown menus |
ezr_saved_analysis_file_name |
name of the .csv file on which saved analysis will be recorded (default = "ezr_saved_analysis.csv") |
ezr_run_analysis_file_name |
name of the .csv file on which all conducted analyses will be recorded (default = "ezr_run_analysis.csv") |
There will be no output from this function. Rather, the ezr program will open on a new tab or window of the local machine's web browser
if (interactive()) {start_ezr(data = mtcars)}
if (interactive()) {start_ezr(data = mtcars)}
Shows frequency and proportion of unique values in a table format
tabulate_vector( vector = NULL, na.rm = TRUE, sort_by_decreasing_count = NULL, sort_by_increasing_count = NULL, sort_by_decreasing_value = NULL, sort_by_increasing_value = NULL, total_included = TRUE, sigfigs = NULL, round_digits_after_decimal = NULL, output_type = "dt" )
tabulate_vector( vector = NULL, na.rm = TRUE, sort_by_decreasing_count = NULL, sort_by_increasing_count = NULL, sort_by_decreasing_value = NULL, sort_by_increasing_value = NULL, total_included = TRUE, sigfigs = NULL, round_digits_after_decimal = NULL, output_type = "dt" )
vector |
a character or numeric vector |
na.rm |
if |
sort_by_decreasing_count |
if |
sort_by_increasing_count |
if |
sort_by_decreasing_value |
if |
sort_by_increasing_value |
if |
total_included |
if |
sigfigs |
number of significant digits to round to |
round_digits_after_decimal |
round to nth digit after decimal
(alternative to |
output_type |
if |
a data.table or data.frame
tabulate_vector(c("a", "b", "b", "c", "c", "c", NA)) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sort_by_increasing_count = TRUE) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sort_by_decreasing_value = TRUE) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sort_by_increasing_value = TRUE) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sigfigs = 4) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), round_digits_after_decimal = 1) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), output_type = "df")
tabulate_vector(c("a", "b", "b", "c", "c", "c", NA)) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sort_by_increasing_count = TRUE) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sort_by_decreasing_value = TRUE) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sort_by_increasing_value = TRUE) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), sigfigs = 4) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), round_digits_after_decimal = 1) tabulate_vector(c("a", "b", "b", "c", "c", "c", NA), output_type = "df")