> test <- data.frame()
> test<-rbind(test,c("hi","i","am","bob"))
> test<-rbind(test,c("hi","i","am","alice"))
Warning message:
In `[<-.factor`(`*tmp*`, ri, value = "alice") :
invalid factor level, NAs generated
Why does this minimal example produce that error? I want to append several string-rows to an empty data frame.
See Question&Answers more detail:os