def dup
      Daru::Vector.new to_a.dup,
        name: @name,
        index: @index.dup,
        type: :category,
        categories: categories,
        ordered: ordered?
    end
Duplicated a vector
@return [Daru::Vector] duplicated vector
@example
dv = Daru::Vector.new [:a, 1, :a, 1, :c], type: :category
dv.dup
# => #<Daru::Vector(5)>
#   0   a
#   1   1
#   2   a
#   3   1
#   4   c