r create empty vector of length code example Example 1: make empty vector r vector = c() Example 2: r empty vector of length X <- vector(mode="character", length=10)