I have a data frame where one of the columns is strings:
> head(a$type)
[1] Sell Sell Sell Buy Buy Buy
Levels: Buy Sell
When I append
to it, it converts everything to an int:
> head(append(a$type, "Buy"))
[1] "2" "2" "2" "1" "1" "1"
Why does this happen, and how can I prevent it?