[BioC] adding environment variables
Kasper Daniel Hansen
kasperdanielhansen at gmail.com
Thu Oct 28 16:43:14 CEST 2010
I would use some object to encode the file location. The object might
have additional information as well. Conceptually, this is similar to
how biomaRt has a mart object which specifies a biomart server.
You can do the same with options or environment variables, however,
for your use case I would find it unnatural. Specifically because
your files are data as opposed to executables/libraries.
Kasper
On Thu, Oct 28, 2010 at 10:21 AM, Robert M. Flight <rflight79 at gmail.com> wrote:
> Hi All,
>
> I am developing a package that requires information about the location
> of a set of files that will be used often in the calculations. In my
> current version, I define the location in the main file that calls all
> the subfunctions. This works fine when you are installing from source,
> but will not work so well if I want people to be able to install
> binary versions of the package. Therefore, I think the best way to
> encode the information would be through the use of an environment
> variable, that could then be read by "Sys.getenv(VARIABLE)" when the
> function is called.
>
> In the help, I found a few different ways to set environment
> variables, but the easiest way (from my reading anyways) seemed to be
> by creating the file "Renviron.site" in the R_HOME/etc directory and
> adding the variable there. I am interested in opinions from the list,
> or other suggestions on how to do this.
>
> For those who are interested, the package does a lot of parsing of
> KEGG KGML files, and to speed up calculations I offer advice that they
> should download a copy of the KGML directory for their organism to
> their local machine, and I want the package to know where those files
> are at runtime.
>
> Thanks in advance,
>
> -Robert
>
> Robert M. Flight, Ph.D.
> University of Louisville Bioinformatics Laboratory
> University of Louisville
> Louisville, KY
>
> PH 502-852-0467
> EM robert.flight at louisville.edu
> EM rflight79 at gmail.com
>
> Williams and Holland's Law:
> If enough data is collected, anything may be proven by
> statistical methods.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
More information about the Bioconductor
mailing list