Skip to content

Commit

Permalink
the relevant documentation examples now use the in-package example da…
Browse files Browse the repository at this point in the history
…ta file
  • Loading branch information
jasenfinch committed Sep 29, 2021
1 parent 20b5344 commit 99e9084
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 26 deletions.
2 changes: 2 additions & 0 deletions R/binneRlyse.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#' @seealso \code{\link{Binalysis-class}}, \code{\link{binParameters}},
#' \code{\link{sampleInfo}}, \code{\link{binnedData}}, \code{\link{accurateData}}
#' @examples
#' \dontrun{
#' files <- metaboData::filePaths('FIE-HRMS','BdistachyonTechnical')
#'
#' info <- metaboData::runinfo('FIE-HRMS','BdistachyonTechnical')
Expand All @@ -31,6 +32,7 @@
#' analysis <- binneRlyse(files,
#' info,
#' parameters = parameters)
#' }
#' @importFrom dplyr ungroup n
#' @importFrom magrittr %>%
#' @importFrom crayon blue red green
Expand Down
13 changes: 5 additions & 8 deletions R/detect.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
#' @return Numeric vector of detected infusion scans.
#' @seealso \code{\link{detectParameters}}
#' @examples
#' if (requireNamespace("metaboData", quietly = TRUE)) {
#' detectInfusionScans(
#' metaboData::filePaths('FIE-HRMS',
#' 'BdistachyonTechnical',
#' ask = FALSE)[1])
#' }
#' file_paths <- system.file('example-data/1.mzML.gz',package = 'binneR')
#'
#' detectInfusionScans(file_paths)
#' @importFrom mzR openMSfile header
#' @importFrom dplyr group_by summarise
#' @export
Expand Down Expand Up @@ -71,8 +68,8 @@ detectInfusionScans <- function(files,
#' @param files character vector of file paths
#' @return S4 object of class BinParameters
#' @examples
#' files <- metaboData::filePaths('FIE-HRMS','BdistachyonTechnical')
#' parameters <- detectParameters(files[1])
#' file_paths <-system.file('example-data/1.mzML.gz',package = 'binneR')
#' parameters <- detectParameters(file_paths)
#' @seealso \code{\link{BinParameters-class}}, \code{\link{binParameters}}
#' @export

Expand Down
6 changes: 4 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ setMethod('plotChromatogram',signature = 'Binalysis',
#' @param files character vector of file paths to use
#' @param scans specify scans to highlight within the plot
#' @examples
#' plotChromFromFile(metaboData::filePaths('FIE-HRMS','BdistachyonTechnical')[1],
#' scans = c(6,18))
#' file_paths <- system.file('example-data/1.mzML.gz',package = 'binneR')
#'
#' plotChromFromFile(file_paths,
#' scans = detectInfusionScans(file_paths))
#' @export

plotChromFromFile <- function(files, scans = c()){
Expand Down
5 changes: 2 additions & 3 deletions R/readFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
#' and \code{?future::plan} for details on how this can be specified.
#' @examples
#' ## Example file path
#' file_paths <- metaboData::filePaths('FIE-HRMS',
#' 'BdistachyonTechnical')[1]
#' file_paths <- system.file('example-data/1.mzML.gz',package = 'binneR')
#'
#' ## Optionally declare parallel processing backend
#' # plan(future::multisession,workers = 2)
#'
#' ## Process example file
#' res <- readFiles(file_paths,
#' dp = 2,
#' scans = 6:17)
#' scans = detectInfusionScans(file_paths))
#'
#' @importFrom furrr future_map
#' @importFrom dplyr bind_rows
Expand Down
2 changes: 2 additions & 0 deletions R/singleSample.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
#' \code{binner_dp} or the environment variable \code{BINNER_DP}.
#'
#' @examples
#' \dontrun{
#' file_path <- metaboData::filePaths('FIE-HRMS','BdistachyonTechnical')[1]
#'
#' ## Optionally declare parallel processing backend
#' # plan(future::multisession,workers = 2)
#'
#' bd <- singleSample(file_path)
#' }
#' @importFrom utils capture.output
#' @export

Expand Down
2 changes: 2 additions & 0 deletions man/binneRlyse.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions man/detectInfusionScans.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/detectParameters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/plotChromFromFile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions man/readFiles.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/singleSample.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 99e9084

Please sign in to comment.