@KumarP wrote:
str(data)
Classes ‘tbl_df’, ‘tbl’ and ‘data.frame’: 227745 obs. of 37 variables:
county : chr "Buskerud" "Buskerud" "Oslo" "Oslo" ... age_group : chr “24-34” “65+” “55-64” “24-34” …
gender : int 2 2 2 2 2 2 2 2 2 2 ... life_phase : chr “Småbarnsfamilie” “SeniorEnslig” “MiddelaldrendeEnslig” “UngdomStudent” …
drivetime : int 30 30 30 30 30 30 30 30 30 30 ... couple_pair : chr “P” “E” “E” “E” …
kids : int 1 0 0 0 1 0 0 0 0 1 ... house_type : chr “Eneboliger” “Rekkehus, kjedehus og andre småhus” “Tomannsboliger” “Store boligbygg (blokk)” …
$ car_type : chr “VAN_SEGMENT” “B_SMAABILER” “D_MELLOMKLASSEN” “U_NONE” …char_var <- c(“county”,“age_group”,“life_phase”,“couple_pair”,“house_type”,“car_type”)
class(char_var)I have 6 char variables out of 37.need to convert those char variables into numeric. and include in my dataframe.
Posts: 1
Participants: 1