[R] infix paste and package
    Christian Hoffmann 
    christian at echoffmann.ch
       
    Thu Jun 19 15:10:12 CEST 2014
    
    
  
Hi,
I can successfully define  in .R and in  > R
"%&%" <- function(a,b) { paste(a,b,sep="") }
nd use in R >
  "a" %&% "b"
[1] "ab"
but in a package definition .Rd
....
\name{pasteInfix}
\alias{pasteInfix}
\alias{\%&\%
}
\usage{ a  \%&\% b
}
will fail in R CMD   check --as-cran  saying
"I am" %&%
+  " hungry" # [1] "I am hungry"
Error: could not find function "%&%"
Execution halted.
What is wrong in my .Rd file?
PS:  The placement of the closing } and the escaping of "%" seem also 
critical.
TIA  Christian
-- 
Christian W. Hoffmann
Mathematiker
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christian at echoffmann.ch
home: www.echoffmann.ch
    
    
More information about the R-help
mailing list