So I'm trying to do something so simple that it amazes me how complicated it turns out to be. 

Given a simple data.table, I just want to replace its first row by a vector of length equal to the number of columns in the data.table. 

Simple enough, right ? Not quite. Enter the ridiculously convoluted world of data.table indexing.

```
x = data.table(stupidColumnA=22, stupidColumnB=33)
x[1, ] = c(100, 200)

```

Why in the world would this intuitive syntax that works in every programming language spit this out:

```
Warning messages:
1: In `[<-.data.table`(`*tmp*`, 1, , value = c(100, 200)) :
  Supplied 2 items to be assigned to 1 items of column 'stupidColumnA' (1 unused)
2: In `[<-.data.table`(`*tmp*`, 1, , value = c(100, 200)) :
  Supplied 2 items to be assigned to 1 items of column 'stupidColumnB' (1 unused)

```

is beyond me. What's even more mind bending is that searching online for like 15 minutes was totally and utterly fruitless. 

Needless to say, anything more complicated than a one-liner to accomplish this basic task is just bad design in my opinion, so I've given up on data.table for this. Doing it with an ugly cast to data.frame works as expected, just because.

```
> xx = as.data.frame(x)
> xx[1, ] = c(100, 200)
> xx
  stupidColumnA stupidColumnB
1  100  200

```

But I am just curious. What would a data.table-only solution look like ?

**Edit (Solution):**

For some reason this question is deemed unworthy, unrealistic (i.e. will never occur in practice) and hence is down-voted. Anyway the solution is:

`xx[1, (colnames(xx)):= list(1,2)]`

in case anyone stumbles across this highly theoretical problem