I apologise for this very basic question, but I found no answers on the web.
I want to create a data.table with n columns, named i1 ... i'n', with only
one row with value = 100 for every variable.

I can do it "by hand":

M.dt <- data.table(i1=100,i2=100,i3=100)

but I would like to make it in a loop, as 'n' is large in my case.


Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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