From da1c02694e0fabcd0092f469b5a617641b285e16 Mon Sep 17 00:00:00 2001 From: Givanna Putri Date: Sat, 25 May 2024 08:24:30 +1000 Subject: [PATCH] redo docs --- .github/workflows/check-standard.yaml | 2 +- R/BatchAdjust.R | 9 ++++----- R/do.add.cols.R | 1 - R/do.zscore.R | 3 +-- R/read.spatial.files.R | 1 - man/do.add.cols.Rd | 7 +++++-- man/do.zscore.Rd | 4 ++++ man/run.pca.Rd | 6 +++--- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 99a0a486..90f6e6e4 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 + # - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 with: diff --git a/R/BatchAdjust.R b/R/BatchAdjust.R index 3730f863..e0a6e753 100755 --- a/R/BatchAdjust.R +++ b/R/BatchAdjust.R @@ -1,8 +1,7 @@ -#' BatchAdjust -#' -#' Functions provided for BatchAdjust -#' -#' @export +# BatchAdjust +# +# Functions provided for BatchAdjust +# ######## Version from https://github.com/i-cyto/CytofBatchAdjust/edit/master/BatchAdjust.R to allow on windows diff --git a/R/do.add.cols.R b/R/do.add.cols.R index 491a04ac..0624dd5c 100755 --- a/R/do.add.cols.R +++ b/R/do.add.cols.R @@ -198,7 +198,6 @@ do.add.cols <- function(dat, # the list of dataframes (samples) where each dataf #' #' @references \url{https://sydneycytometry.org.au/spectre}. #' -#' @examples #' #' @import data.table #' diff --git a/R/do.zscore.R b/R/do.zscore.R index 072fe11d..a8a067a7 100755 --- a/R/do.zscore.R +++ b/R/do.zscore.R @@ -10,8 +10,7 @@ #' @return Returns a new data.table with z-score calculations for each selected column #' #' @examples -# res <- do.zscore(dat = Spectre::demo.sum, -# use.cols = names(Spectre::demo.sum)[c(4:15)]) +#' res <- do.zscore(dat = Spectre::demo.sum, use.cols = names(Spectre::demo.sum)[c(4:15)]) #' #' @import data.table #' diff --git a/R/read.spatial.files.R b/R/read.spatial.files.R index 462663a5..d2c03533 100755 --- a/R/read.spatial.files.R +++ b/R/read.spatial.files.R @@ -10,7 +10,6 @@ #' #' @return Returns a list of spatial data objects. #' -#' @examples #' #' @import data.table #' diff --git a/man/do.add.cols.Rd b/man/do.add.cols.Rd index 62e0b6a2..8ac9e50d 100644 --- a/man/do.add.cols.Rd +++ b/man/do.add.cols.Rd @@ -26,10 +26,13 @@ Returns the data.table with new columns embedded. do.add.cols } \examples{ -add.dt <- data.table('Files' = unique(Spectre::demo.asinh$FileName), + +dat <- Spectre::demo.clustered[,1:19] + +add.dt <- data.table('Files' = unique(dat$FileName), 'SampleNumber' = c(1:12)) -cell.dat <- do.add.cols(dat = Spectre::demo.asinh, +cell.dat <- do.add.cols(dat = dat, base.col = "FileName", add.dat = add.dt, add.by = "Files") diff --git a/man/do.zscore.Rd b/man/do.zscore.Rd index 57f4abcc..3e7e1293 100644 --- a/man/do.zscore.Rd +++ b/man/do.zscore.Rd @@ -21,3 +21,7 @@ Returns a new data.table with z-score calculations for each selected column \description{ do.zscore - Calculate z.score for a dataset } +\examples{ +res <- do.zscore(dat = Spectre::demo.sum, use.cols = names(Spectre::demo.sum)[c(4:15)]) + +} diff --git a/man/run.pca.Rd b/man/run.pca.Rd index d5aba273..98c82986 100644 --- a/man/run.pca.Rd +++ b/man/run.pca.Rd @@ -112,20 +112,20 @@ Spectre::run.pca(dat = Spectre::demo.clustered, ) # When prompted, type in "5" and click enter to continue function -(this selects the elbow point based off the scree plot) +# (this selects the elbow point based off the scree plot) ## Possible issues ## # Remove any NA present na.omit(dat) # Remove columns that have zero variance (e.g. if MFI is the same for all -samples for a marker) +# samples for a marker) dat <- data.table::as.data.table(dat) dat <- dat[ , lapply(.SD, function(v) if(data.table::uniqueN(v, na.rm = TRUE) > 1) v)] # Ellipses are only generated in 'plot.ind.group' when there are at least -2 samples per group ('group.ind') +# 2 samples per group ('group.ind') } \author{