From 06037def6755c14485871c5868d66c9d2fe70119 Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Mon, 27 Sep 2021 10:33:27 +0100 Subject: [PATCH 1/6] bumped version to 0.5.7 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index fa14de1..1acbce9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: metaboMisc Title: Miscellaneous Functions for Metabolomics Analyses -Version: 0.5.6 +Version: 0.5.7 Authors@R: person("Jasen", "Finch", email = "jsf9@aber.ac.uk", role = c("aut", "cre")) Description: Miscellaneous helper functions for metabolomics analyses that do not yet have a permanent home. URL: https://jasenfinch.github.io/metaboMisc From cb6991d6c13864bac9c6359990fe9df32e513fb2 Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Mon, 27 Sep 2021 10:36:14 +0100 Subject: [PATCH 2/6] removed metaboData from remotes field --- DESCRIPTION | 1 - 1 file changed, 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1acbce9..b628768 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,5 +42,4 @@ Remotes: aberHRML/binneR, jasenfinch/metabolyseR, jasenfinch/profilePro, jasenfinch/MFassign, - aberHRML/metaboData, jasenfinch/grover From 1085f63c5da1128f2d885b3ff2de2ca4d2e6191b Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Mon, 27 Sep 2021 11:04:32 +0100 Subject: [PATCH 3/6] added sanitiseTable for restricting table rows and rounding numeric columns --- NAMESPACE | 1 + R/sanitise.R | 20 ++++++++++++++++++++ man/sanitiseTable.Rd | 21 +++++++++++++++++++++ tests/testthat/test-sanitise.R | 10 ++++++++++ 4 files changed, 52 insertions(+) create mode 100644 R/sanitise.R create mode 100644 man/sanitiseTable.Rd create mode 100644 tests/testthat/test-sanitise.R diff --git a/NAMESPACE b/NAMESPACE index be7f01b..47ea0c5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -42,6 +42,7 @@ importFrom(dplyr,filter) importFrom(dplyr,group_by) importFrom(dplyr,group_by_all) importFrom(dplyr,mutate) +importFrom(dplyr,mutate_if) importFrom(dplyr,n) importFrom(dplyr,n_distinct) importFrom(dplyr,rename) diff --git a/R/sanitise.R b/R/sanitise.R new file mode 100644 index 0000000..afb72d4 --- /dev/null +++ b/R/sanitise.R @@ -0,0 +1,20 @@ +#' Sanitise a data table +#' @description Sanitise a data table by restricting the number of rows and rounding numeric columns. +#' @param x A tibble or data.frame containing the data to be sanitised +#' @param maxRows Maximum number of rows with which to restrict the table +#' @param sigFig Significant figures with which to round numeric columns +#' @examples +#' sanitiseTable(iris,maxRows = 10,sigFig = 1) +#' @importFrom dplyr mutate_if + + +sanitiseTable <- function(x,maxRows = 5000,sigFig = 3){ + x <- mutate_if(x,is.numeric,signif,digits = sigFig) + + if (nrow(x) > maxRows){ + message(str_c('Number of rows in table restricted to ',maxRows,'.')) + x <- x[seq_len(maxRows),] + } + + return(x) +} diff --git a/man/sanitiseTable.Rd b/man/sanitiseTable.Rd new file mode 100644 index 0000000..8bca359 --- /dev/null +++ b/man/sanitiseTable.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sanitise.R +\name{sanitiseTable} +\alias{sanitiseTable} +\title{Sanitise a data table} +\usage{ +sanitiseTable(x, maxRows = 5000, sigFig = 3) +} +\arguments{ +\item{x}{A tibble or data.frame containing the data to be sanitised} + +\item{maxRows}{Maximum number of rows with which to restrict the table} + +\item{sigFig}{Significant figures with which to round numeric columns} +} +\description{ +Sanitise a data table by restricting the number of rows and rounding numeric columns. +} +\examples{ +sanitiseTable(iris,maxRows = 10,sigFig = 1) +} diff --git a/tests/testthat/test-sanitise.R b/tests/testthat/test-sanitise.R new file mode 100644 index 0000000..fcb9272 --- /dev/null +++ b/tests/testthat/test-sanitise.R @@ -0,0 +1,10 @@ + +test_that("tables can be sanitised", { + n_rows <- 10 + sig_figs <- 1 + + x <- sanitiseTable(iris,maxRows = n_rows,sigFig = sig_figs) + + expect_equal(nrow(x),n_rows) + expect_equal(x$Sepal.Length[1],5) +}) From 345202c528ef07a3aa874d9028bc57b78d54d0b0 Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Mon, 27 Sep 2021 11:11:31 +0100 Subject: [PATCH 4/6] update namespace --- NAMESPACE | 1 + R/sanitise.R | 1 + 2 files changed, 2 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 47ea0c5..637c14e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -22,6 +22,7 @@ export(exportSummarisedAssignments) export(featureSummary) export(preTreatModes) export(reduce) +export(sanitiseTable) export(suitableParallelPlan) exportMethods(plotRSD) importFrom(MFassign,assignedData) diff --git a/R/sanitise.R b/R/sanitise.R index afb72d4..1351a1d 100644 --- a/R/sanitise.R +++ b/R/sanitise.R @@ -6,6 +6,7 @@ #' @examples #' sanitiseTable(iris,maxRows = 10,sigFig = 1) #' @importFrom dplyr mutate_if +#' @export sanitiseTable <- function(x,maxRows = 5000,sigFig = 3){ From 112167ce02906859c57726e1727f3ff2953645c5 Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Mon, 27 Sep 2021 11:18:13 +0100 Subject: [PATCH 5/6] updated package news --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index 85e5288..a4098f8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# metaboMisc 0.5.7 + +* Removed `aberHRML/metaboData` from the Remotes field in the DESCRIPTION to ensure that the CRAN version of metaboData is installed. + +* Added `sanitiseTable()` that can be used to restrict the number of rows in a table and round numeric columns to a given number of significant figures. + # metaboMisc 0.5.6 * Fixed missing argument error in `detectPretreatmentParameters()` when miss injections are detected. From d35822155d1606f13a143b9bf848e3605a1ab51a Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Mon, 27 Sep 2021 11:21:28 +0100 Subject: [PATCH 6/6] updated pkgdowns site --- docs/404.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 10 +- docs/pkgdown.yml | 2 +- docs/reference/addAssignments.html | 2 +- docs/reference/convertSampleInfo.html | 2 +- docs/reference/detectBatchDiff.html | 4 +- docs/reference/detectMissInjections.html | 4 +- docs/reference/detectModellingParameters.html | 4 +- .../detectPretreatmentParameters.html | 4 +- docs/reference/export.html | 2 +- docs/reference/exportCSV.html | 2 +- docs/reference/featureSummary.html | 4 +- docs/reference/index.html | 8 +- docs/reference/plotRSD.html | 4 +- docs/reference/preTreatModes.html | 8 +- docs/reference/reduce.html | 8 +- docs/reference/reexports.html | 2 +- docs/reference/sanitiseTable.html | 183 ++++++++++++++++++ docs/reference/suitableParallelPlan.html | 2 +- docs/sitemap.xml | 3 + 22 files changed, 232 insertions(+), 32 deletions(-) create mode 100644 docs/reference/sanitiseTable.html diff --git a/docs/404.html b/docs/404.html index 8ae3611..e24e55f 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ metaboMisc - 0.5.6 + 0.5.7 diff --git a/docs/authors.html b/docs/authors.html index a742036..d46507d 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ metaboMisc - 0.5.6 + 0.5.7 diff --git a/docs/index.html b/docs/index.html index 018728a..f85b484 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@ metaboMisc - 0.5.6 + 0.5.7 diff --git a/docs/news/index.html b/docs/news/index.html index cb37219..235ee42 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ metaboMisc - 0.5.6 + 0.5.7 @@ -114,6 +114,14 @@

Changelog

Source: NEWS.md +
+

+metaboMisc 0.5.7

+
    +
  • Removed aberHRML/metaboData from the Remotes field in the DESCRIPTION to ensure that the CRAN version of metaboData is installed.

  • +
  • Added sanitiseTable() that can be used to restrict the number of rows in a table and round numeric columns to a given number of significant figures.

  • +
+

metaboMisc 0.5.6

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index a8c9625..6e16535 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.11.4 pkgdown: 1.6.1 pkgdown_sha: ~ articles: {} -last_built: 2021-09-21T08:03Z +last_built: 2021-09-27T10:19Z urls: reference: https://jasenfinch.github.io/metaboMisc//reference article: https://jasenfinch.github.io/metaboMisc//articles diff --git a/docs/reference/addAssignments.html b/docs/reference/addAssignments.html index 132c2fc..2898bbb 100644 --- a/docs/reference/addAssignments.html +++ b/docs/reference/addAssignments.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7
diff --git a/docs/reference/convertSampleInfo.html b/docs/reference/convertSampleInfo.html index 50e333b..344f27f 100644 --- a/docs/reference/convertSampleInfo.html +++ b/docs/reference/convertSampleInfo.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7 diff --git a/docs/reference/detectBatchDiff.html b/docs/reference/detectBatchDiff.html index d2a4852..d892d75 100644 --- a/docs/reference/detectBatchDiff.html +++ b/docs/reference/detectBatchDiff.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7 @@ -165,7 +165,7 @@

Examp
#> #> Attaching package: ‘purrr’
#> The following object is masked from ‘package:metaboMisc’: #> -#> reduce
#> binneR v2.5.3 Tue Sep 21 09:04:10 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.9S]
+#> reduce
#> binneR v2.5.3 Mon Sep 27 11:19:18 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.9S]
## Detect batch differences batch_diff <- detectBatchDiff(analysis)
#> Batches with < 3 replicates removed: "3", "5"
#> Only 1 batch detected, skipping detection
diff --git a/docs/reference/detectMissInjections.html b/docs/reference/detectMissInjections.html index b79fc9c..1e45955 100644 --- a/docs/reference/detectMissInjections.html +++ b/docs/reference/detectMissInjections.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7
@@ -158,7 +158,7 @@

Examp analysis <- binneR::binneRlyse(files, info, parameters = binneR::detectParameters(files)) -
#> binneR v2.5.3 Tue Sep 21 09:04:14 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.3S]
+
#> binneR v2.5.3 Mon Sep 27 11:19:22 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.3S]
## Detect miss injections miss_injections <- detectMissInjections(analysis) diff --git a/docs/reference/detectModellingParameters.html b/docs/reference/detectModellingParameters.html index b370e40..21c7f47 100644 --- a/docs/reference/detectModellingParameters.html +++ b/docs/reference/detectModellingParameters.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7
@@ -166,7 +166,7 @@

Examp analysis <- binneR::binneRlyse(files, info, parameters = binneR::detectParameters(files)) -
#> binneR v2.5.3 Tue Sep 21 09:04:17 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.2S]
+
#> binneR v2.5.3 Mon Sep 27 11:19:25 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.2S]
## Detect modelling parameters modelling_parameters <- detectModellingParameters(analysis) diff --git a/docs/reference/detectPretreatmentParameters.html b/docs/reference/detectPretreatmentParameters.html index 0beaf1f..d020047 100644 --- a/docs/reference/detectPretreatmentParameters.html +++ b/docs/reference/detectPretreatmentParameters.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7
@@ -154,7 +154,7 @@

Examp ## Perform spectral binning bd <- binneR::binneRlyse(file_paths,sample_information,bp) -
#> binneR v2.5.3 Tue Sep 21 09:04:21 2021
#> ________________________________________________________________________________
#> Scans: 5:13
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [3.1S]
+
#> binneR v2.5.3 Mon Sep 27 11:19:28 2021
#> ________________________________________________________________________________
#> Scans: 5:13
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [3.2S]
## Detect pre-treatment parameters pp <- detectPretreatmentParameters(bd)
#> Only 1 batch detected, skipping detection
diff --git a/docs/reference/export.html b/docs/reference/export.html index af1f971..f433747 100644 --- a/docs/reference/export.html +++ b/docs/reference/export.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7
diff --git a/docs/reference/exportCSV.html b/docs/reference/exportCSV.html index 7decd22..a381af3 100644 --- a/docs/reference/exportCSV.html +++ b/docs/reference/exportCSV.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7 diff --git a/docs/reference/featureSummary.html b/docs/reference/featureSummary.html index a82828e..abe97e8 100644 --- a/docs/reference/featureSummary.html +++ b/docs/reference/featureSummary.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7 @@ -148,7 +148,7 @@

Examp analysis <- binneR::binneRlyse(files, info, parameters = binneR::detectParameters(files)) -
#> binneR v2.5.3 Tue Sep 21 09:04:26 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.3S]
+
#> binneR v2.5.3 Mon Sep 27 11:19:33 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.3S]
featureSummary(analysis)
#> # A tibble: 2 × 3 #> Mode `Number of bins` `Missing Data (%)` diff --git a/docs/reference/index.html b/docs/reference/index.html index 382af53..878352f 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ metaboMisc - 0.5.6 + 0.5.7
@@ -207,6 +207,12 @@

sanitiseTable()

+ +

Sanitise a data table

+ +

suitableParallelPlan()

diff --git a/docs/reference/plotRSD.html b/docs/reference/plotRSD.html index b15cc95..febf8b5 100644 --- a/docs/reference/plotRSD.html +++ b/docs/reference/plotRSD.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7 @@ -153,7 +153,7 @@

Examp analysis <- binneR::binneRlyse(files, info, parameters = binneR::detectParameters(files)) -
#> binneR v2.5.3 Tue Sep 21 09:04:29 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.9S]
+
#> binneR v2.5.3 Mon Sep 27 11:19:36 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [3S]
## Plot RSD distributions plotRSD(analysis)
#> $n
#> diff --git a/docs/reference/preTreatModes.html b/docs/reference/preTreatModes.html index 58eba62..4812faa 100644 --- a/docs/reference/preTreatModes.html +++ b/docs/reference/preTreatModes.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7
@@ -169,7 +169,7 @@

Examp analysis <- binneR::binneRlyse(files, info, parameters = bp) -
#> binneR v2.5.3 Tue Sep 21 09:04:34 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.3S]
+
#> binneR v2.5.3 Mon Sep 27 11:19:42 2021
#> ________________________________________________________________________________
#> Scans: 5:14
#> ________________________________________________________________________________
#> Reading raw data
#> Gathering bins
#> Removing single scan events
#> Averaging intensities across scans
#> Calculating bin metrics
#> Calculating accurate m/z
#> Building intensity matrix
#> Gathering file headers
#>
#> Completed! [2.3S]
## Declare pre-treatment parameters pre_treatment_parameters <- analysisParameters('pre-treatment') parameters(pre_treatment_parameters, @@ -186,7 +186,7 @@

Examp pre_treated_data <- preTreatModes(analysis, pre_treatment_parameters)

#> -#> metabolyseR v0.14.3 Tue Sep 21 09:04:37 2021 +#> metabolyseR v0.14.3 Mon Sep 27 11:19:44 2021 #> ________________________________________________________________________________ #> Parameters: #> pre-treatment @@ -204,7 +204,7 @@

Examp #> #> ________________________________________________________________________________ #> -#> Negative modeNegative mode [0.6S] +#> Negative modeNegative mode [0.5S] #> Positive modePositive mode [0.6S] #> ________________________________________________________________________________ #> diff --git a/docs/reference/reduce.html b/docs/reference/reduce.html index 07cf152..63b7105 100644 --- a/docs/reference/reduce.html +++ b/docs/reference/reduce.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7

@@ -164,7 +164,7 @@

Examp assignment <- assignMFs(peakData,p)
#> -#> MFassign v0.7.10 Tue Sep 21 09:04:38 2021
#> ________________________________________________________________________________
#> Assignment Parameters: +#> MFassign v0.7.10 Mon Sep 27 11:19:46 2021
#> ________________________________________________________________________________
#> Assignment Parameters: #> #> Technique: FIE #> Max M: 1000 @@ -176,8 +176,8 @@

Examp #> n: [M-H]1-, [M+Cl]1-, [M+K-2H]1-, [M-2H]2-, [M+Cl37]1-, [2M-H]1- #> p: [M+H]1+, [M+K]1+, [M+Na]1+, [M+K41]1+, [M+NH4]1+, [M+2H]2+, [2M+H]1+ #> Isotopes: 13C, 18O, 13C2 -#> Transformations: M - [O] + [NH2], M - [OH] + [NH2], M + [H2], M - [H2] + [O], M - [H] + [CH3], M - [H] + [NH2], M - [H] + [OH], M + [H2O], M - [H3] + [H2O], M - [H] + [CHO2], M - [H] + [SO3], M - [H] + [PO3H2]

#> ________________________________________________________________________________
#> No. m/z: 9
#> Calculating correlations
#> Calculating correlations [24 correlations] [0.1S]
#> Filtering correlations
#> Filtering correlations [24 correlations] [0S]
#> Preparing correlations
#> Preparing correlations [0S]
#> Calculating relationships
#> Calculating relationships [7.3S]
#> Adduct & isotope assignment
#> Adduct & isotope assignment [12S]
#> Transformation assignment iteration 1
#> Transformation assignment iteration 1 [0S]
#> ________________________________________________________________________________
#> -#> Complete! [19.3S]
+#> Transformations: M - [O] + [NH2], M - [OH] + [NH2], M + [H2], M - [H2] + [O], M - [H] + [CH3], M - [H] + [NH2], M - [H] + [OH], M + [H2O], M - [H3] + [H2O], M - [H] + [CHO2], M - [H] + [SO3], M - [H] + [PO3H2]
#> ________________________________________________________________________________
#> No. m/z: 9
#> Calculating correlations
#> Calculating correlations [24 correlations] [0.1S]
#> Filtering correlations
#> Filtering correlations [24 correlations] [0S]
#> Preparing correlations
#> Preparing correlations [0S]
#> Calculating relationships
#> Calculating relationships [7.3S]
#> Adduct & isotope assignment
#> Adduct & isotope assignment [12.2S]
#> Transformation assignment iteration 1
#> Transformation assignment iteration 1 [0S]
#> ________________________________________________________________________________
#> +#> Complete! [19.6S]
## Retrieve assigned data assigned_data <- metabolyseR::analysisData( assignedData(assignment), diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html index 99b0cbf..8a225c7 100644 --- a/docs/reference/reexports.html +++ b/docs/reference/reexports.html @@ -77,7 +77,7 @@ metaboMisc - 0.5.6 + 0.5.7
diff --git a/docs/reference/sanitiseTable.html b/docs/reference/sanitiseTable.html new file mode 100644 index 0000000..9029ab6 --- /dev/null +++ b/docs/reference/sanitiseTable.html @@ -0,0 +1,183 @@ + + + + + + + + +Sanitise a data table — sanitiseTable • metaboMisc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
+

Sanitise a data table by restricting the number of rows and rounding numeric columns.

+
+ +
sanitiseTable(x, maxRows = 5000, sigFig = 3)
+ +

Arguments

+ + + + + + + + + + + + + + +
x

A tibble or data.frame containing the data to be sanitised

maxRows

Maximum number of rows with which to restrict the table

sigFig

Significant figures with which to round numeric columns

+ + +

Examples

+
sanitiseTable(iris,maxRows = 10,sigFig = 1) +
#> Number of rows in table restricted to 10.
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species +#> 1 5 4 1 0.2 setosa +#> 2 5 3 1 0.2 setosa +#> 3 5 3 1 0.2 setosa +#> 4 5 3 2 0.2 setosa +#> 5 5 4 1 0.2 setosa +#> 6 5 4 2 0.4 setosa +#> 7 5 3 1 0.3 setosa +#> 8 5 3 2 0.2 setosa +#> 9 4 3 1 0.2 setosa +#> 10 5 3 2 0.1 setosa
+
+ +
+ + +
+ + +
+

Site built with pkgdown 1.6.1.

+
+ +
+
+ + + + + + + + diff --git a/docs/reference/suitableParallelPlan.html b/docs/reference/suitableParallelPlan.html index 8cd8c45..907fadd 100644 --- a/docs/reference/suitableParallelPlan.html +++ b/docs/reference/suitableParallelPlan.html @@ -72,7 +72,7 @@ metaboMisc - 0.5.6 + 0.5.7 diff --git a/docs/sitemap.xml b/docs/sitemap.xml index b5202c6..ce234cd 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -42,6 +42,9 @@ https://jasenfinch.github.io/metaboMisc//reference/reexports.html + + https://jasenfinch.github.io/metaboMisc//reference/sanitiseTable.html + https://jasenfinch.github.io/metaboMisc//reference/suitableParallelPlan.html