Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • rcall : file Rhistory.do already exists

    After the first use of rcall, an error occurs when using it again:


    Code:
    file C:\Program Files\Stata17\ado\plus/r/Rhistory.do already exists

    I run my code in a .do file, for example:


    Code:
    sysuse auto, clear
    rcall: data <- st.data()

    How can I solve this problem?
    What is the correct way to use it? (All links in the help document have expired, and it may be difficult to contact the author.)




  • #2
    I hesitate to respond, not having used -rcall- myself, but have you tried deleting RHistory.do before invoking -rcall-? It looks like -rcall- writes a history file each time it runs (in an inappropriate placed at that) and forgets to add the replace option to the open statement. Somehow RHistory.do is deleted when -rcall- is loaded, but not each time it is invoked. I am speculating, but you shouldn't give up easily. -set trace on- will show you where the replace option is missing.

    Comment


    • #3
      Thank you. I resolve this issue later on, as it seems to be caused by file permissions (perhaps RHistory.do gets automatically deleted). I wonder where everyone installs Stata? It seems installing it on the C drive by default causes some problems.

      Comment

      Working...
      X