4

I am a professor at a small college, and I am working with a blind student in a statistics course. We have found that R is by far the most accessible system to use, and for the screen reader to work (i.e. for it to read the output), we need to run R out of the Command Prompt (the student uses a Windows machine, specifically one running Windows 7). Though using the R console would probably be easier to operate, for some reason the screen reader being used by the student (JAWS) doesn't read the output in the console.

We have gotten to the point where we can use R out of the Command Prompt just fine, but the issue is that we cannot save the command history and the output from the Command Prompt to an external file (e.g. a .txt). I understand that I can use the sink() function to get the output in a .txt file, and I can also use the savehistory() function to get the command history, but I need something that captures both. We have also tried to use CMD outside of the R environment to try and print the full session of the Command Prompt, but that doesn't seem to capture the work that we might do during an R session.

On a Mac, this wouldn't be a problem, but I am not the best with using the Windows Command Prompt.

Any help would be greatly appreciated, and if more detail is required, I am more than happy to provide it.

Sam J
  • 41
  • 1
  • 1
    You might check out the options to `source`. Sadly, it wouldn't be interactive, but I think with echo turned on, it will get pretty close to a fuller document of the session. – lmo Oct 04 '17 at 23:53
  • Is this what you're looking for? https://stackoverflow.com/questions/7096989/how-to-save-all-console-output-to-file-in-r (The top-rated answer is basically Imo's suggestion) – HFBrowning Oct 06 '17 at 16:56
  • Another idea would be to try using the bash emulator for Windows that comes installed with git: https://git-for-windows.github.io/ I've found it very easy to use (and install! no wrangling!) to complete tasks here and there that are hard on Windows normally. But I'm not a Mac user, so I'm not sure how its terminal compares to bash. – HFBrowning Oct 06 '17 at 17:16

0 Answers0