0
I created a new column in a Tibble, to use as a second column identifier. However, there are repeated values, and I would like these repeated values to have the same identifier.
prec_med_novo <- mutate(prec_med, COD_SUBS = as.integer(length(25991)))
preco_med <- prec_med_novo[, c(37, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36)]
preco_med
Column 37 (i.e., the first, has the values I wish to change, and column 1, the values to which they will be bound.
What are the names of the 1st and 2nd columns?
– Rui Barradas
length(25991)
is class"integer"
, doesn’t needas.integer
. And the value is always 1.– Rui Barradas
cod_subs, substance, respectively
– Leonardo Gonçalves da Fonseca