hello R community.
I'm trying to make this data's salary (I can't share my csv file as it seems) data numeric as such:
data$salary<-as.numeric(data$salary)
but it's ending up as "double", how can I solve this problem?
thanks a lot, in advance <3!
hello R community.
I'm trying to make this data's salary (I can't share my csv file as it seems) data numeric as such:
data$salary<-as.numeric(data$salary)
but it's ending up as "double", how can I solve this problem?
thanks a lot, in advance <3!
Hi @maaanaaa21. "double" is a numeric data type. Here is an explanation from R for Data Science.
Integer and double vectors are known collectively as numeric vectors. In R, numbers are doubles by default. To make an integer, place an L after the number:
You can also use as.integer() instead of as.numeric()
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.