functional select update

I have a table tab, and I have a list of columns allCols 

I want to calculate their correlation against anther column rr. Below doesn’t seem to work: 

?[tab; enlist 1b; 0b;allCols!{ x, cor, y }'[4#`rr; allCols] ];

but if I just do a simple average, 

?[tab; enlist 1b; 0b;allCols!{ avg, x } each allCols]

would work. 

What’s the magic syntax I should stick into { }? 

So close..allcols!{(cor;x;y)}‘[allcols;rr]Remember you have ‘parse’ to help you here to see what the functional looks like.On Fri, Sep 04, 2015 at 3:52 PM, ZCodeNoob > wrote:I have a table tab, and I have a list of columns allColsI want to calculate their correlation against anther column rr. Below doesn’t seem to work:?[tab; enlist 1b; 0b;allCols!{ x, cor, y }’[4#`rr; allCols] ];but if I just do a simple average,?[tab; enlist 1b; 0b;allCols!{ avg, x } each allCols]would work.What’s the magic syntax I should stick into { }?–

Submitted via Google Groups

it is convenient to use “partial” lists in cases like this

allcols!(cor;;`rr)each allcols

Cheers,

  Attila