[BlindRUG] auto load of BrailleR, was Some Questions

Godfrey, Jonathan A.J.Godfrey at massey.ac.nz
Fri Jun 12 22:56:08 UTC 2015


Hello Voica et al,

Strictly speaking you are correct in the method you suggested for ensuring BrailleR is always loaded. There are a few things people should be aware of before using it though.

First, your solution will lead to BrailleR always being loaded. There are instances where this might not be a good idea. BrailleR does take over a few things that might irritate some people. If we use an .Rprofile file in the working directory, it only applies to the work being done when R was started in that directory. This means we can have some working directories that are for BrailleR output and some where other work won't be contaminated by BrailleR.

The second reason for using a local file rather than the r_home based one is that when we change to a new version of R, the location of r_home will change. This means we need to move our .Rprofile content from one place to another as we change versions of R. The local .Rprofile won't have this problem.

Finally, the functions in BrailleR are not allowed to touch the main R installation. This means that if I am to incorporate the creation of an .Rprofile in the package, it can only be a local .Rprofile. I will need  to leave the use of the r_home .Rprofile to the more experienced users like you who can do it for themselves.

Again, this is a really useful discussion.
Jonathan



-----Original Message-----
From: BlindRUG [mailto:blindrug-bounces at nfbnet.org] On Behalf Of Voica Gavrilut via BlindRUG
Sent: Friday, 12 June 2015 7:36 p.m.
To: Blind R Users Group
Cc: Voica Gavrilut
Subject: Re: [BlindRUG] Some Questions

Hello,

>    1. Auto Load
>    I want BrailleR package to be loaded automatically when starting R.
> How can I do?
For example I use the config file that already exists in the R installation - the R_HOME/etc/Rprofile. in this file I added a function to change my working directory and to load some of my useful
scripts:
.First <- function() {
setwd("my_path")
source("my_script1.r")
#library("BrailleR")
}
Take care to the dot before the function name and the first letter capitalized, are part of the R config requirements.

Good luck
--
G.Voica

_______________________________________________
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