I have a data.frame as the following :
myPhoneHTML
X1 X2 X3 X4 X5 X6 X7
1 Brand Model Price Screen Weight GB Date
2 Apple iPhone7 24500 4.7 138 32 20160916
3 HTC OneM8 21900 5 160 16 20140328
4 HTC OneS9 9990 5 158 32 20160617
5 ASUS ZenFoneDeluxe 8990 5.5 170 16 20150827
6 ASUS ZenFoneZoom 15990 5.5 185 64 20151201
How do i take Brand~Data as factor instead of x1~x7?
like this :
Brand Model Price Screen Weight GB Date
1 Apple iPhone7 24500 4.7 138 32 20160916
2 HTC OneM8 21900 5.0 160 16 20140328
3 HTC OneS9 9990 5.0 158 32 20160617
4 ASUS ZenFoneDeluxe 8990 5.5 170 16 20150827
5 ASUS ZenFoneZoom 15990 5.5 185 64 20151201
(There's no x1~x7 but Brand~Data) Thanks!