Skip to content

Commit

Permalink
Add parameter dec to exportMetaboAnalyst (issue #296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Jul 18, 2018
1 parent 950a3fe commit c7e2682
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions R/functions-XCMSnExp.R
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,8 @@ overlappingFeatures <- function(x, expandMz = 0, expandRt = 0, ppm = 0) {
#' @param value `character(1)` specifying the value to be returned for each
#' feature. See [featureValues()] for more details.
#'
#' @param dec `character(1)` defining the decimal point character.
#'
#' @param ... additional parameters to be passed to the [featureValues()]
#' function.
#'
Expand All @@ -1777,7 +1779,7 @@ overlappingFeatures <- function(x, expandMz = 0, expandRt = 0, ppm = 0) {
#'
#' @md
exportMetaboAnalyst <- function(x, file = NULL, label,
value = "into", ...) {
value = "into", dec = ".", ...) {
if (!is(x, "XCMSnExp"))
stop("'x' is supposed to be an XCMSnExp object")
fv <- featureValues(x, value = value, ...)
Expand All @@ -1800,8 +1802,8 @@ exportMetaboAnalyst <- function(x, file = NULL, label,
Label = as.character(label),
fv)
if (!is.null(file))
write.table(fv, file = file, dec = ".", sep = ",", qmethod = "double",
col.names = FALSE, row.names = TRUE)
write.table(fv, file = file, dec = dec, sep = ",",
qmethod = "double", col.names = FALSE, row.names = TRUE)
else
fv
}
4 changes: 3 additions & 1 deletion man/exportMetaboAnalyst.Rd

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

0 comments on commit c7e2682

Please sign in to comment.