From wdunlap at tibco.com  Fri Apr 18 18:50:22 2014
From: wdunlap at tibco.com (William Dunlap)
Date: Fri, 18 Apr 2014 16:50:22 +0000
Subject: [Rd] Can the output of Sys.getenv() be improved?
In-Reply-To: <8EE4E2C595735A4EAEC2A3311537FE4D15B84B24@DCPWPEXMBX03.mdanderson.edu>
References: <8EE4E2C595735A4EAEC2A3311537FE4D15B84B24@DCPWPEXMBX03.mdanderson.edu>
Message-ID: <E66794E69CFDE04D9A70842786030B933FAC7207@PA-MBX01.na.tibco.com>

> Within an R session, type Sys.getenv() will list all the environment variables, but each one
> of them occupies about a page, so scrolling to find one is difficult. Is this because I don't
> know how to use it or something could be improved? 

Attaching the class "simple.list" to the output of Sys.getenv() gives it
a nicer print method:

   > structure(Sys.getenv(), class="simple.list")
                           _                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
   ALCKPath                C:\\Program Files\\Lenovo\\AutoLock                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
   ALLUSERSPROFILE         C:\\ProgramData                                                       
   ...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
   windir                  C:\\Windows                                    

(I don't know why print.simple.list adds the line with a hyphen above the 2nd
column at the top.)

Bill Dunlap
TIBCO Software
wdunlap tibco.com


> -----Original Message-----
> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf
> Of Jun Zhang
> Sent: Friday, April 18, 2014 9:38 AM
> To: r-devel at r-project.org
> Subject: [Rd] Can the output of Sys.getenv() be improved?
> 
> Within an R session, type Sys.getenv() will list all the environment variables, but each one
> of them occupies about a page, so scrolling to find one is difficult. Is this because I don't
> know how to use it or something could be improved? Usually I'm not sure the exact
> name of a variable but want to look it up. Recently I installed rjags, with the JAGS-3.4.0's
> lib, include, modules information provided during compilation. When I load rjags, I was
> told that it linked to JAGS 3.3.0 (a package also available in my environment). This made
> me think there must be a variable to make that to happen. What can I do to make rjags
> to link to JAGS 3.4.0?
> 
> Jun
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Can the output of Sys.getenv() be improved?
William Dunlap