[BlindRUG] R Questions

Godfrey, Jonathan A.J.Godfrey at massey.ac.nz
Sat Mar 6 23:01:01 UTC 2021


Hello Niels,

I seldom adjust the R profile nowadays. I have several reasons.

1. On windows, the default global R profile is part of the installation. Each time I update R, the profile is in the wrong place and needs moving. I did do that occasionally but that was years ago now.
2. I might edit the copy of the r profile in a specific work folder, but again, the usefulness to me has reduced. The reason relates to your next question.

You will not edit an R script from the R terminal. It is just a plain text file though so you could edit it using any text editor of your choosing. If you do this, you need to pull the script into the R session using `source()`, with the filename in the brackets as a quoted string. I do this very rarely nowadays.

The use of R markdown has made the above all quite inefficient. I do practically all work inside an R markdown file because that speeds up the time to production of the final product I want to share. I only use the R prompt (terminal or GUI version) for little jobs or to get at help functionality.

My data analysis workflow (today) is to 

1. make a text file with the *.Rmd extension. I use WriteR and sometimes just plain old notepad. I might start from a blank file, a template, or sometimes using an old Rmd file that has a lot of what I want in it.
2. If using WriteR, I process to html using the f5 key.
3. if not using WriteR, I use rmarkdown::render() to process the file from the R terminal.
4. to see my results, I open (and keep it open)  the html file step 2 or 3 created, and refresh it as I update my Rmd file and re-process it. In most browsers that uses f5.


I still use R script files for package development of course. There are some rare occasions when an analysis job involves very long processing times and those tend to be done using an R script too, but that's mostly old habits.


HTH
Jonathan

-----Original Message-----
From: BlindRUG <blindrug-bounces at nfbnet.org> On Behalf Of Niels Luithardt via BlindRUG
Sent: Sunday, 7 March 2021 6:13 AM
To: blindrug at nfbnet.org
Cc: Niels Luithardt <niels.luithardt at googlemail.com>
Subject: [BlindRUG] R Questions

Hello,

I have a few questions about the program R and hope you can help me.

1) Is it useful to customize the Rprofile file?

2) How can I open/run a script in RTerm?

Kind regards

Niels

_______________________________________________
BlindRUG mailing list
BlindRUG at nfbnet.org
http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org
To unsubscribe, change your list options or get your account info for BlindRUG:
http://nfbnet.org/mailman/options/blindrug_nfbnet.org/a.j.godfrey%40massey.ac.nz
The list archive can be viewed at:
http://www.nfbnet.org/pipermail/blindrug_nfbnet.org
More information and useful links about using R as a blind person can be obtained at:
http://R-Resources.massey.ac.nz

Look for help using R commands by reading the accessible e-book "Let's Use R Now" compiled by Jonathan Godfrey at:
http://R-Resources.massey.ac.nz/lurn/front.html



More information about the BlindRUG mailing list