# NOT RUN {
(x <- back2ForwardSlash())
#c:\users\
#NOTE: The "#" in this example is not needed.
# It is included here to suppress a spurious warning
# in the automated testing of the package via "R CMD check".
# }
# NOT RUN {
all.equal(x, '#c:/users/')
# }
# NOT RUN {
(x2. <- back2ForwardSlash(2))
#c:\u\a b\n o
#d:\pqr\
# }
# NOT RUN {
all.equal(x2., c('#c:/u/a b/n o', '#d:/pqr/'))
# }
# NOT RUN {
# }
# NOT RUN {
<!-- %\dontrun{ -->
# }
# NOT RUN {
<!-- %# Same again, this time from a file -->
# }
# NOT RUN {
<!-- %fname <- system.file('tests', 'example_back2ForwardSlash.txt', package = 'sos') -->
# }
# NOT RUN {
<!-- %lines <- readLines(fname) -->
# }
# NOT RUN {
<!-- %(x3 <- back2ForwardSlash(lines)) -->
# }
# NOT RUN {
# }
# NOT RUN {
<!-- %\dontshow{stopifnot(} -->
# }
# NOT RUN {
<!-- %all.equal(x3, c('c:/Users/', 'c:/u/a b/c d')) -->
# }
# NOT RUN {
<!-- %\dontshow{)} -->
# }
# NOT RUN {
<!-- %} -->
# }
Run the code above in your browser using DataLab