Skip to content

Commit

Permalink
fix: devtools notes
Browse files Browse the repository at this point in the history
  • Loading branch information
tin900 committed Apr 23, 2024
1 parent 4291f6b commit d7e0fa7
Show file tree
Hide file tree
Showing 23 changed files with 127 additions and 591 deletions.
5 changes: 2 additions & 3 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
^.*\.Rproj$
^\.Rproj\.user$
^build\.R
^R/app\.R$
^R/global\.R$

^app\.R$
^ui\.R$
5 changes: 0 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,12 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Imports:
arrow,
datamods,
DescTools,
DT,
exact2x2,
feather,
fst,
haven,
irr,
magrittr,
readxl,
rintrojs,
rstatix,
shiny,
Expand Down
6 changes: 4 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ export("%>%")
export(app_server)
export(app_ui)
export(choose_statistical_test)
export(create_dependent_variable_histogram)
export(determine_dependent_variable)
export(determine_independent_variable)
export(diagnose)
export(display_data_table)
export(get_variable_class_info)
export(handle_file_upload)
export(perform_friedman_test)
export(perform_statistical_test)
export(run_vvdoctor)
importFrom(magrittr,"%>%")
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# vvdoctor 0.0.1

* Initial CRAN submission.
42 changes: 39 additions & 3 deletions R/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ display_data_table <- function(data) {
}


# Determine the type of dependent variable
#' Determine the Type of Dependent Variable
#'
#' This function determines the type of the dependent variable based on its data type and distribution.
#'
#' @param dependent_var A vector representing the dependent variable.
#'
#' @return A character string indicating the type of the dependent variable.
#'
#' @export
determine_dependent_variable <- function(dependent_var) {
# Check if the selected dependent variable is numeric/float
if (is.numeric(dependent_var)) {
Expand Down Expand Up @@ -39,7 +47,15 @@ determine_dependent_variable <- function(dependent_var) {
}
}

# Determine the type of independent variable
#' Determine the Type of Independent Variable
#'
#' This function determines the type of the independent variable based on its data type and the number of unique values.
#'
#' @param independent_var A vector representing the independent variable.
#'
#' @return A character string indicating the type of the independent variable.
#'
#' @export
determine_independent_variable <- function(independent_var) {
# Check if the selected independent variable is numeric/float
if (is.numeric(independent_var)) {
Expand All @@ -59,7 +75,15 @@ determine_independent_variable <- function(independent_var) {
}
}

# Create the histogram plot for the dependent variable
#' Create a Histogram Plot for the Dependent Variable
#'
#' This function creates a histogram plot for a numeric dependent variable.
#'
#' @param dependent_var A numeric vector representing the dependent variable.
#'
#' @return No return value, the function creates a histogram plot.
#'
#' @export
create_dependent_variable_histogram <- function(dependent_var) {
if (is.numeric(dependent_var)) {
graphics::hist(dependent_var, main = "Histogram of Dependent Variable", xlab = "Values")
Expand Down Expand Up @@ -224,6 +248,18 @@ get_variable_class_info <- function(variable) {
}
}



#' Perform Statistical Test
#'
#' This function performs the appropriate statistical test based on the user's input.
#'
#' @param data A data frame containing the variables.
#' @param input A list containing the user's input, including the selected statistical test, dependent variable, independent variable, identifier variable, and input mean.
#'
#' @return The result of the statistical test.
#'
#' @export
perform_statistical_test <- function(data, input) {
test_name <- input$statistical_test
dependent_var <- input$dependent_var
Expand Down
186 changes: 0 additions & 186 deletions R/helperfunctions.R

This file was deleted.

51 changes: 0 additions & 51 deletions R/perform_friedman_test.R

This file was deleted.

15 changes: 0 additions & 15 deletions R/perform_repeated_measures_anova.R

This file was deleted.

Loading

0 comments on commit d7e0fa7

Please sign in to comment.