0
Meine Datensatz smarket (aus der Bibliothek ISLR) eine Spalte Richtung wieGuss String-Spalte in numerische
Direction
1 Up
2 Down
3 Down
4 Up
5 Down
6 Up
Wie werfe ich es in eine binäre Spalte wie
Direction
1 0
2 1
3 1
4 0
5 1
6 0
tun folgendes I bekomme nichts. Was soll ich machen?
data <- Smarket
data$Direction <- as.factor(as.numeric(data$Direction))