[R] help with my sloppy syntax

Christos Hatzis christos.hatzis at nuverabio.com
Thu Aug 14 17:27:19 CEST 2008


Would something like this work?

my.list <- as.list(c(NIM.results$par, a.hat.decision, etc))
do.call("Draw.NIM.POD.curve", my.list) 

-Christos Hatzis

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Charles Annis, P.E.
> Sent: Thursday, August 14, 2008 11:11 AM
> To: r-help at r-project.org
> Cc: annisc at asme.org
> Subject: [R] help with my sloppy syntax
> 
> R-ians:
> 
> After some effort I coerced my code to do what I want but my 
> syntax is a kludge.  Suggestions on more elegant syntax?
> 
> 	par <- NIM.results$par
> 	do.call("Draw.NIM.POD.curve", list(par[1], par[2], 
> par[3], par[4],
> 	par[5], a.hat.decision, .... et cetera ...
> 
> It seems that I should be able to avoid defining the variable 
> "par" and then specifying each of its elements, but all my 
> attempts resulted in a list whose first element is a list, 
> rather than the elements of the list.  And my attempts at 
> unlist were unsuccessful.
> 
> Thank you.
> 
> Charles Annis, P.E.
> 
> Charles.Annis at StatisticalEngineering.com
> phone: 561-352-9699
> eFax:  614-455-3265
> http://www.StatisticalEngineering.com
>  
> 
> ______________________________________________
> R-help at r-project.org mailing list
> 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