Skip to content

Commit

Permalink
updated the docs and help for robex main
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Aug 28, 2019
1 parent f30a6c5 commit 6cd5d96
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ inst/runROBEX.sh
inst/ROBEX
src/
ROBEX/
ROBEX.zip
34 changes: 21 additions & 13 deletions R/robex.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#' @examples
#' result = robex(infile = "", outfile = "")
#'
#' if (requireNamespace("kirby21.t1")) {
#' if (requireNamespace("kirby21.t1", quietly = TRUE)) {
#' infile = kirby21.t1::get_t1_filenames(id = "113", visit = 1)
#' if (is.null(infile)) {
#' infile = ""
#' infile = ""
#' }
#' if (!file.exists(infile)) {
#' outdir = tempdir()
Expand All @@ -37,20 +37,27 @@ robex = function(
...){


infile = neurobase::checkimg(infile)
xinfile = infile
infile = shQuote(infile)
if (file.exists(infile)) {
infile = neurobase::checkimg(infile)
infile = normalizePath(infile)
infile = shQuote(infile)
}
xoutfile = outfile
outfile = path.expand(outfile)
outfile = normalizePath(outfile, "/")
outfile = file.path(normalizePath(dirname(outfile), "/"),
basename(outfile))
if (.Platform$OS.type == "windows") {
outfile = gsub("\\", "/", outfile, fixed = TRUE)
outfile = gsub("/+", "/", outfile)
outfile = gsub("/", "\\\\", outfile)
if (length(outfile) > 0) {
if (nchar(outfile) > 0) {
outfile = path.expand(outfile)
outfile = normalizePath(outfile, winslash = "/")
outfile = file.path(normalizePath(dirname(outfile), "/"),
basename(outfile))
if (.Platform$OS.type == "windows") {
outfile = gsub("\\", "/", outfile, fixed = TRUE)
outfile = gsub("/+", "/", outfile)
outfile = gsub("/", "\\\\", outfile)
}
outfile = shQuote(outfile)
}
}
outfile = shQuote(outfile)

# install_robex()

Expand Down Expand Up @@ -83,3 +90,4 @@ robex = function(
outfile = xoutfile)
)
} ## end robex

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

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

0 comments on commit 6cd5d96

Please sign in to comment.