samedi 6 février 2021

How to identify number values in r

I am a new R user and have just started working with dataframes. I am trying to create a new column within a dataframe (using the code below). referring the column has the charators, numeric, null values, but I want to know if the value is numeric true results should come as “Champion” if False “YY”

mutate(champ=ifelse(is.na(is.numeric(created_by_user_id))==TRUE,"champion","YY")) %>%

created_by_user_id Test123@gmail.com

40961 3492 41043 Test123@gmail.com

40973 32755 3096 Null Null

Aucun commentaire:

Enregistrer un commentaire