Skip to content
Prev 25874 / 29559 Next

$columns that I added to a data frame don't have attr(*, "label")

How can I make $size and $stock
(that I made)

have attr()   like the $columns that came with the data

$ CLUSTER         :Classes 'labelled', 'integer'  atomic [1:90435] 4 4 4 4
4 4 4 4 4 4 ...
  .. ..- attr(*, "label")= Named chr "Socio-economic level of locality"
  .. .. ..- attr(*, "names")= chr "CLUSTER"
 $ size            : chr  "largest" "largest" "largest" "largest" ...
 $ stock           : num  596 596 596 596 596 ...