R data.frame integer column convert NA -
i have data below in csv file. read data data.frame in r using read.csv command
my play2 column after import has values (7,na, na,na etc) want convert nas blanks @ same time maintain column integer column
how that?
time_s it_rms play play2 play3 0 0.744608402 # 7 abc 60 1.540045857 @ na na 120 2.217387915 1 ! null * 2 5.052185059 216 13.14362144 ^ 7.940382004 298 9.155433655 na nan 4 5
i tried below code. final_data_file name of data.frame had data, changed datatype of column :(
final_data_file$play2[is.na(final_data_file$play2)]="" final_data_file$play2[is.na(final_data_file$play2)]
character(0)
Comments
Post a Comment