[R] Vector of char generated by Sys.getenv function is not available when the package is loaded

Gabor Grothendieck ggrothendieck at gmail.com
Mon Sep 23 21:14:21 CEST 2013


On Mon, Sep 23, 2013 at 2:55 PM, Jose Claudio Faria
<joseclaudio.faria at gmail.com> wrote:
> trPaths <- paste(paste(Sys.getenv('APPDATA'),
>                        '\\Tinn-R\\tmp\\',
>                        sep=''),
>                  c('',
>                    'search.txt',
>                    'objects.txt',
>                    'file.r',
>                    'selection.r',
>                    'block.r',
>                    'lines.r',
>                    'reformat-input.r',
>                    'reformat-output.r'),
>                  sep='')
>

Try this:


trPaths <- file.path(
   Sys.getenv('APPDATA'),
   'Tinn-R',
    'tmp',
    c('',
                   'search.txt',
                   'objects.txt',
                   'file.r',
                   'selection.r',
                   'block.r',
                   'lines.r',
                   'reformat-input.r',
                   'reformat-output.r'),
   fsep = '\\')



-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list