Dear R-users,
I would like to construct a list of arguments for a function in a format
function (list(item1=c("A","B"), item2=c("B","C")), item3=...):
The individual vectors in the list are permutations of colnames of a
dataframe.
The trouble is that I am not able to handle escaping of parentheses
correctly.

I was trying the following:
library(gregmisc)
combinations.2<-combinations(12,2,mycolnames)
combinations.2.call<-apply(combinations.2,1,function(x){do.call(paste,c(
as.list(x),sep="\",\""))})
combinations.2.call<-paste("c(\"",combinations.2.call,"\")",sep="")

but now calling call("list",combinations.2.list) doesnt work.


Could anyone give an advice on this? Thank you.

----------------------------------------------------------------------------------------------
Jiøí Voller
Laboratory of Growth Regulators
Palacký University & Institute of Experimental Botany AS CR
©lechtitelù 11, 783 71 Olomouc
Czech Republic
landline: +420-585-634-855
mobile: +420-737-520-506
fax: +420-585-634-870
----------------------------------------------------------------------------------------------

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to