How to create an empty R vector to add new items

vec <- vector()

See also vector help

?vector

I pre-allocate a vector with

> (a <- rep(NA, 10))
 [1] NA NA NA NA NA NA NA NA NA NA

You can then use [] to insert values into it.