s-news
[Top] [All Lists]

error in the "translate" command in version Hmisc-20030924

To: <s-news@wubios.wustl.edu>
Subject: error in the "translate" command in version Hmisc-20030924
From: <Willi.Weber@aventis.com>
Date: Mon, 26 Jan 2004 15:31:54 +0100
Cc: <fharrell@virginia.edu>
Thread-index: AcPkGSUurSfCMVDKSxqQduna9XDjsw==
Thread-topic: error in the "translate" command in version Hmisc-20030924
Hello 
we installed the latest Hmisc version and run into an error in the
"translate" command in version Hmisc-20030924

We changed the following code to correct this error:

   k <- unlist(lapply(text, function(x)
                       {
                         sys(paste("echo \'", x, "\' | ", command, sep = ""))
                       }
                       ))

translate(c("ABC","DEF"),"ABCDEFG", "abcdefg")
Problem in FUN(...X.sub.i....): Object "command" not found 
Use traceback() to see the call stack

You must hand over "command" to the function.
   k <- unlist(lapply(text, function(x,command)
                       {
                         sys(paste("echo \'", x, "\' | ", command, sep = ""))
                       }, command
                       ))

 translate(c("ABC","DEF"),"ABCDEFG", "abcdefg")
[1] "abc" "def"

Now translate does his job again!
Regards
Willi Weber

> AVENTIS Pharma
> DI&A, LO, DMPK,
> Population PK/PD, 
> 
> 

<Prev in Thread] Current Thread [Next in Thread>