I have a defined reference class and a list:
RCclass<-setRefClass("RCclass",field=list(info="character"))
A<-RCclass$new(info="a")
B<-RCclass$new(info="b")
testList<-list(A,B)
do.call(function(x){paste0(x$info)},testList)
The do.call function doesn't look quite right, and it doesn't give me the expected string "ab". However I am not sure how to achieve this. Please share your opinions; thanks!
I found a solution around this:
Reduce("paste0",(lapply(testList,FUN=function(x)x$info)))