[R] Access function as text from package by name

MacQueen, Don m@cqueen1 @end|ng |rom ||n|@gov
Thu Sep 27 17:33:36 CEST 2018


Or

  sink('stuff.txt') ; graphics::box ; sink()

to have it in a text file.

--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 

On 9/27/18, 4:55 AM, "R-help on behalf of Rui Barradas" <r-help-bounces using r-project.org on behalf of ruipbarradas using sapo.pt> wrote:

    Hello,
    
    Maybe
    
    capture.output(graphics::box)
    
    
    Hope this helps,
    
    Rui Barradas
    
    Às 11:30 de 27/09/2018, Sigbert Klinke escreveu:
    > Hi,
    > 
    > I want to have a function, e.g. graphics::box, as text.
    > Currently I'am using
    > 
    > deparse(eval(parse(text='graphics::box')))
    > 
    > It is important that '::' and ':::' can be used in the name.
    > 
    > Is there a simpler way?
    > 
    > Thanks
    > 
    > Sigbert
    > 
    > 
    > 
    > ______________________________________________
    > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
    > https://stat.ethz.ch/mailman/listinfo/r-help
    > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    > and provide commented, minimal, self-contained, reproducible code.
    >
    
    ______________________________________________
    R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.
    



More information about the R-help mailing list