[R] Assigning & function to variable

Rainer M Krug Rainer at krugs.de
Fri Feb 21 11:07:16 CET 2014


Hi

I want to assign the function & and | to a variable, because I want to
specify as a function argument if inside the function & or | should be
used.

  link <- &

does not work, and

  link <- "&" 

results in the string "&" being assigned to link.

So how can I assign the logical function to the variable link, so that I
can do

TRUE link FALSE

Thanks,

Rainer


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20140221/fa5cba87/attachment.bin>


More information about the R-help mailing list