From 5994d56864c17fa2b33c9688c33b69574a83aeba Mon Sep 17 00:00:00 2001 From: Sean Hackett Date: Mon, 22 Apr 2024 11:00:35 -0700 Subject: [PATCH] passing R CMD check locally --- NAMESPACE | 1 + R/data_classes.R | 2 +- man/reform_tidy_omic.Rd | 28 ++++++++++++++++++++++++++++ tests/testthat/test-dim_reduction.R | 1 - 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 man/reform_tidy_omic.Rd diff --git a/NAMESPACE b/NAMESPACE index a3e96c3..a94cc12 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -36,6 +36,7 @@ export(plot_heatmap) export(plot_univariate) export(plotsaverInput) export(plotsaverServer) +export(reform_tidy_omic) export(remove_missing_values) export(shiny_filter_test) export(shiny_ggbiv_test) diff --git a/R/data_classes.R b/R/data_classes.R index 93c3aac..f17ce37 100644 --- a/R/data_classes.R +++ b/R/data_classes.R @@ -1026,7 +1026,7 @@ infer_tomic_table_type <- function(tomic, tomic_table) { #' #' @param tidy_data A tibble containing measurements along with sample metadata. This #' table can be obtained as the "data" attribute from a romic "tidy_omic" object. -#' @inheritParams romic::check_design +#' @inheritParams check_design #' #' @details This is handy for passing data and metadata through approaches like parsnip #' which expect data to be formatted as a data.frame diff --git a/man/reform_tidy_omic.Rd b/man/reform_tidy_omic.Rd new file mode 100644 index 0000000..f6cc003 --- /dev/null +++ b/man/reform_tidy_omic.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data_classes.R +\name{reform_tidy_omic} +\alias{reform_tidy_omic} +\title{Reform Tidy Omic} +\usage{ +reform_tidy_omic(tidy_data, tomic_design) +} +\arguments{ +\item{tidy_data}{A tibble containing measurements along with sample metadata. This +table can be obtained as the "data" attribute from a romic "tidy_omic" object.} + +\item{tomic_design}{a list with named attributes describing feature, +sample, and measurement variables.} +} +\description{ +This function recreates a `tidy_omic` object from the "data" and "design" +attributes of this object. +} +\details{ +This is handy for passing data and metadata through approaches like parsnip +which expect data to be formatted as a data.frame +} +\examples{ +tidy_data <- romic::brauer_2008_tidy$data +reform_tidy_omic(tidy_data, romic::brauer_2008_tidy$design) + +} diff --git a/tests/testthat/test-dim_reduction.R b/tests/testthat/test-dim_reduction.R index 1f65eac..f77db3b 100644 --- a/tests/testthat/test-dim_reduction.R +++ b/tests/testthat/test-dim_reduction.R @@ -40,5 +40,4 @@ test_that("Matrices keys are reconstructed with appropriate classes", { expect_s3_class(imputed_tomic, "triple_omic") } - })