object '.trPaths' not found

Help
2009-09-23
2012-09-25
  • Martin Hvidberg

    Martin Hvidberg - 2009-09-23

    I just installed R and Tinn-R (R 2.9.2 win; Tinn-R_2.3.2.3) fresh downloads.

    When I load an old and proven .R file in the editor and press the "R
    send: file (echo =TRUE)" button, all I get in the R Console, is this
    error message:

    > source(.trPaths, echo=TRUE, max.deparse.length=150)
    Error in source(.trPaths, echo = TRUE, max.deparse.length = 150) :
    object '.trPaths' not found

    This is the same on several independent computers. Everything used to work
    (still works on another computer) with R 2.8.0 and Tinn-R 1.19.4.7

    What is wrong? What do I do?

    :-( Martin Hvidberg

     
  • jcfaria

    jcfaria - 2009-09-23

    Hello Martin,

    It is very simple to solve the pointed out!
    Basically, you will use an option of the menu R of the Tinn-R main menu.

    All instructions are in Help/Main/User guide/HTML of Tinn-R menu.

    Give looked and let me know whether the instructions are clear.

    HTH,
    JCFaria

     
  • Dave Hewitt

    Dave Hewitt - 2009-09-23

    JC gives complete details on how to set up the new sourcing approach under
    Basic -> Configuration in the HTML help. It's a change from 1.X where now
    the code chunks are written to a file and then sourced back in. Tinn-R has to
    know where to write those chunks and how to tell R to go get them. This
    probably trivializes what's going on, but that's the gist of it. It looks odd
    at first but I quickly got used to it.

     
  • Martin Hvidberg

    Martin Hvidberg - 2009-09-23

    Thanks for your replies - It helped...

    I was thinking; why is this not defalut setting, done atomaticly with
    instalation?
    But as the ansver is properly long and complicated, you don't need to ansver
    that.

    I'm up and running ver. 2.3.2.3

    :-) Martin

    (Now considering to 'git' all my .R files...)

     
  • skyjo

    skyjo - 2009-12-02

    I am having a similar issue, but the help menu did not help me.
    I'm using Tinn-R 2.3.3.1 and R 2.9.2 on Windows XP Pro. I tried adding this
    chunk to the Rprofile.site file:

    library(utils)
    necessary = c('svIDE', 'svIO', 'svSocket', 'R2HTML')
    installed = necessary %in% installed.packages()
    if (length(necessary) >=1)
    install.packages(necessary, dep = T)

    library(svIDE)
    library(svIO)
    library(svSocket)
    library(R2HTML)
    guiDDEInstall()

    ...but if I run a line of code in Tinn-R, R gives me this message:>
    source(.trPaths)
    Error in source(.trPaths) : object '.trPaths' not found

    I also get an error when starting R:
    Warning message:
    In getDependencies(pkgs, dependencies, available, lib) :
    package ‘svIO’ is not available

    package(svIO) is a command in the code I added to Rproject, but it does not
    seem to exist in my version of R (I even went to R>Packages>install and could
    not find svIO).

    Any help would be appreciated.

     
  • Andrew Weir

    Andrew Weir - 2009-12-07

    It appears that svIO is long gone I'm afraid. You can try the following
    package:
    http://cran.r-project.org/web/packages/TinnR/index.html
    which replaces the required functions.

    You also need to add the line:

    .trPaths <- paste(paste(Sys.getenv('APPDATA'), '\Tinn-R\tmp\',
    sep=''), c('', 'search.txt', 'objects.txt', 'file.r', 'selection.r',
    'block.r', 'lines.r'), sep='')

    to your Rprofile.site file. That missing line is what is causing your main
    problem. I guess the code to modify the Rprofile.site file has not been
    updated for a long time. I hope that helps.

     
  • Anonymous - 2009-12-10

    Hi every one!

    I am using (almost trying) Tinn-R 2.3.4.0 under Windows Vista and R 2.10.1 RC
    and have received the same massage:

    Error in source(.trPaths, echo = TRUE, max.deparse.length = 150) :
    object '.trPaths' not found

    I have checked the solution posted by HTH and JCFaria but it does not work at
    all.

    These changes in the Rprofile.site are not the best way to check if the
    requiered packages are already installed. I used to download and install all
    CRAN packages (you don't ever know when a small and shy function can save you
    several programming hours) and the checking process is too slow.

    But I think is a Windows Vista problem rather than a Tinn-R problem.

    If anyone knows a feasible solution, please share it!

     
  • jcfaria

    jcfaria - 2009-12-12

    Andrew said:

    "I guess the code to modify the Rprofile.site file has not been updated for a
    long time."

    It was true before the latest version of Tinn-R: 2.3.4.0 (Dec/06/2009). This
    feature (not a bug) was modified to avoid conflict with old versions.

    Below, the correct (and updated) script that the users you found in the main
    menu of Tinn-R: R\Customize\Rconfigure.r. So, the option R\Configure\Permanent
    (Rprofile.site) will add thie script to the file Rprofile.site located in the
    folder 'etc' where the R is installed.

    ===============================================================

    Tinn-R: necessary packages and functions

    Tinn-R: >= 2.2.0.2 with TinnR package >= 1.0.3

    ===============================================================

    Set the URL of the preferred repository, below some examples:

    options(repos='http://software.rc.fas.harvard.edu/mirrors/R/') # USA

    options(repos='[http://cran.ma.imperial.ac.uk/](http://cran.ma.imperial.ac.uk

    /)') # UK

    options(repos='[http://brieger.esalq.usp.br/CRAN/](http://brieger.esalq.usp.b

    r/CRAN/)') # Brazil

    library(utils)

    Check necessary packages

    necessary <- c('TinnR', 'svSocket')
    installed <- necessary %in% installed.packages()
    if (length(necessary) >=1)
    install.packages(necessary)

    Load packages

    library(TinnR)
    library(svSocket)

    Uncoment the two lines below if you want Tinn-R starts always R starts

    (Observation: check the path of Tinn-R.exe)

    options(IDE='C:/Tinn-R/bin/Tinn-R.exe')

    trStartIDE()

    Set options

    options(use.DDE=T)

    Start DDE

    trDDEInstall()

    .trPaths <- paste(paste(Sys.getenv('APPDATA'), '\Tinn-R\tmp\', sep=''),
    c('', 'search.txt', 'objects.txt', 'file.r', 'selection.r', 'block.r',
    'lines.r'), sep='')

    The parameter dep=TRUE was removed from the line install.packages(necessary,
    dep=TRUE), because the Hmisc package, which enables Tinn-R to export R objects
    to TeX format, has now a lot of dependencies. This change will hasten the
    basic configuration of R.

    HTH,
    JCFaria

     
  • Marcelo Prillo

    Marcelo Prillo - 2009-12-28

    Hello, I am having the same error as described ( source(.trPaths)
    Error in source(.trPaths) : object '.trPaths' not found). I followed the
    instructions in the " Help - HTML" and I would like to know how exactly I need
    to " type in the --sdi switch" after the " Rgui.exe" in my short cut. Could
    you please provide me with the exact syntax? Thank you very much.

     
  • jcfaria

    jcfaria - 2009-12-28

    Hi,

    You must to choice in the main menu of Tinn-R the option R/Configure/Permanent
    (Rprofile.site).

    Tinn-R will do the job for you!

    HTH,
    JCFaria

     
  • Marcelo Prillo

    Marcelo Prillo - 2009-12-28

    JCFaria,

    Tinn-R did the job for me!!!

    Thank you very much.

    Marcelo

     
  • Arthur Gerigk

    Arthur Gerigk - 2010-04-24

    I still have that problem after trying all the things mentioned here.

    Does the folder tinn-r\tmp have to exist in app data?
    because it doesn't on my system.

    I am using windows 7 64 bit. I would be very glad if you could help me

     
  • Arthur Gerigk

    Arthur Gerigk - 2010-04-24

    also after creating the folders and the (empty) files the trpaths error still
    occurs when selecting more than one line

     
  • jcfaria

    jcfaria - 2010-04-25

    agerigk,

    Under Windows (Vista and 7) the option 'R/Configure/Permanent (Rprofile.site)
    checks if the user has administrative privileges to change the content of the
    file
    'Rprofile.site', before to insert the necessary script.
    If the user receive a message error, will be necessary to change manually the
    security properties enabling 'Full control' of the folder 'etc' where
    R is installed.

    HTH,
    JCFaria

     
  • Arthur Gerigk

    Arthur Gerigk - 2010-04-25

    I do have full access on the R folder, the tinn-r folder and I even tried to
    create that tinn-r/tmp folder with full access
    It did not help. Also starting R/Tinn-R as an administrator did not help
    either.

     
  • Udo Junghans

    Udo Junghans - 2010-04-26

    Hello agerigk,

    I got the same problem after updating to R 2.11.0. Seems that the R-Package
    TinnR doesn't run enymore because Hmisc is not available for Windows anymore.
    So the profiles file is interrupting before the line ".trPaths..."
    Try to comment out:

    library(TinnR) to #library(TinnR)
    trDDEInstall() to #trDDEInstall()

    maybe that works.

    Udo

     
  • jcfaria

    jcfaria - 2010-04-27

    Hello,

    Humm... I don't agree with the soluction posted!
    There is a better way...

    After download and install R 2.11.0pat under Linux and Windows, see below my
    results:

    a) Under Linux (Open SUSE 11.3) - I didn't find any problem to install,
    compile and use the packages: TinnR, Hmisc, R2HTML and svSocket.

    b) Under Windows (Vista Ultimate) - after to set the file Rprofile.site with
    the script (generated by Tinn-R, i.e, main menu
    R/Configure/Permanent (Rprofile.site), see below:

    ===============================================================

    Tinn-R: necessary packages and functions

    Tinn-R: >= 2.2.0.2 with TinnR package >= 1.0.3

    ===============================================================

    Set the URL of the preferred repository, below some examples:

    options(repos='http://software.rc.fas.harvard.edu/mirrors/R/') # USA

    options(repos='[http://cran.ma.imperial.ac.uk/](http://cran.ma.imperial.ac.uk

    /)') # UK

    options(repos='[http://brieger.esalq.usp.br/CRAN/](http://brieger.esalq.usp.b

    r/CRAN/)') # Brazil

    library(utils)

    Check necessary packages

    necessary <- c('TinnR', 'svSocket')
    installed <- necessary %in% installed.packages()
    if (length(necessary) >=1)
    install.packages(necessary)

    Load packages

    library(TinnR)
    library(svSocket)

    Uncoment the two lines below if you want Tinn-R to always start R at start-

    up

    (Observation: check the path of Tinn-R.exe)

    options(IDE='C:/Tinn-R/bin/Tinn-R.exe')

    trStartIDE()

    Set options

    options(use.DDE=T)

    Start DDE

    trDDEInstall()

    .trPaths <- paste(paste(Sys.getenv('APPDATA'), '\Tinn-R\tmp\', sep=''),
    c('', 'search.txt', 'objects.txt', 'file.r', 'selection.r', 'block.r',
    'lines.r'), sep='')

    when R was started I receive the messages below:

    IO:
    R version 2.11.0 Patched (2010-04-26 r51822)
    Copyright (C) 2010 The R Foundation for Statistical Computing
    ISBN 3-900051-07-0

    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.

    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.

    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.

    Log:
    Warning: dependency 'Hmisc' is not available
    also installing the dependencies 'R2HTML', 'svMisc'

    trying URL 'http://software.rc.fas.harvard.edu/mirrors/R/bin/windows/contrib/
    2.11/R2HTML_2.0.0.zip
    '
    length 464688 bytes (453 Kb)
    opened URL
    downloaded 453 Kb

    trying URL 'http://software.rc.fas.harvard.edu/mirrors/R/bin/windows/contrib/
    2.11/svMisc_0.9-57.zip
    '
    length 134502 bytes (131 Kb)
    opened URL
    downloaded 131 Kb

    trying URL 'http://software.rc.fas.harvard.edu/mirrors/R/bin/windows/contrib/
    2.11/TinnR_1.0.3.zip
    '
    length 37715 bytes (36 Kb)
    opened URL
    downloaded 36 Kb

    trying URL 'http://software.rc.fas.harvard.edu/mirrors/R/bin/windows/contrib/
    2.11/svSocket_0.9-48.zip
    '
    length 59065 bytes (57 Kb)
    opened URL
    downloaded 57 Kb

    Loading required package: tcltk
    done
    Loading required package: Hmisc
    Error: package 'Hmisc' could not be loaded
    In addition: Warning message:
    In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc
    = lib.loc) :
    there is no package called 'Hmisc'

    As you can see, the main problem is related with the package 'Hmisc' under
    Windows!

    I close R.
    I do a copy/paste from my previous Hmisc package ('library' of my old R
    version: R-2.10.0pat) to the folder 'library' of
    my new R version: R-2.11.0pat.

    So, I start R newly and below the results:

    IO:
    R version 2.11.0 Patched (2010-04-26 r51822)
    Copyright (C) 2010 The R Foundation for Statistical Computing
    ISBN 3-900051-07-0

    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.

    R is a collaborative project with many contributors.
    ' for more information and
    'citation()' on how to cite R or R packages in publications.

    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.

    Log():
    Type 'contributors()Loading required package: mvbutils
    Loading required package: utils
    Loading required package: tools
    Loading required package: tcltk
    done
    Loading required package: scatterplot3d
    Loading required package: rgl
    Loading required package: stats
    Loading required package: grDevices
    Loading required package: MASS
    Loading required package: graphics

    Attaching package: 'graphics'

    The following object(s) are masked from 'package:mvbutils':

    clip

    Loading required package: Hmisc
    Loading required package: survival
    Loading required package: splines

    Attaching package: 'Hmisc'

    The following object(s) are masked from 'package:survival':

    untangle.specials

    The following object(s) are masked from 'package:mvbutils':

    Save

    The following object(s) are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

    Loading required package: R2HTML

    The necessary Hmisc resources used by Tinn-R are all working fine: no problem!
    For while, this is my recomendation.

    HTH,
    JCFaria

     
  • Ari Kornfeld

    Ari Kornfeld - 2010-05-05

    A new version of HMisc that is compatible with R 2.11 was just released (as
    I'm writing this, it's on the main server but not yet on some of the mirrors).
    I'm not the maintainer but seem to have gotten on the maintainer's email list.
    Incidentally, the problem had to do with a defunct argument to text functions
    such as strsplit, so if you use the "extended=" argument yourself in these
    functions, you'll have to change it before it will run in R 2.11.

    -jos

     

Log in to post a comment.