Skip to content
Prev 393168 / 398500 Next

print and lapply....

Well... yes, of course. But assuming the sole purpose is to print the
results and not to save them for further processing, the OP's approach
seems rather painful. My preference would be to vectorize:
TP   TPsq
[1,]    1      1
[2,]    2      4
[3,]    3      9
[4,]    4     16

See ?print.default for details

-- Bert
On Mon, Nov 7, 2022 at 9:20 AM Andrew Simmons <akwsimmo at gmail.com> wrote: