Create a 2D histogram matrix (R) -
i have 2 feature vectors, v1 has car's mpg , v2 has car's age. ordered represent car (v1[1], v2[1] first car's data).
i've created 4 bins each feature vector (and created shadow vectors wherein bin value shown instead of raw number), , want create 2d histogram matrix it.
so should count number of combinations occur, , place count in appropriate matrix cell (ex. if there 20 cars in list fit 2nd bin of mpg , 3rd bin of age, it'll put 20 matrix[2,3]).
my goal able paste histogram excel.
this seems situation looping, i'm not yet familiar in r (it advertised me don't need use loops in r often). appreciate assistance.
Comments
Post a Comment