I have a data.frame file and need to convert to numeric values to do column summation. I used the "dicpes < -as.numeric (dicpes)" code to try to convert and the following message appeared: "Error: (list) object can not be coerced to type 'double'.
Looking at the response from another topic, I decided to separate the columns of the object and convert them individually into numeric values using the following code:
inicio<- dicpes[,1]
inicio<-as.numeric(as.character(inicio)) # transformando em números
tamanho<- dicpes[,2]
tamanho<-as.numeric(as.character(tamanho)) # transformando em números
variavel<- dicpes[,3] # coluna em formato texto
variavel<- as.character(variavel) # manter em formato texto
dicpes<- cbind(inicio, tamanho, variavel)
However, when the last command, the first two columns (start and size) are read again with text too and I can not sum. How to work around this problem?