I have a data frame DF in which few columns are having comma and character values in it. I want to remove comma and replace character values with blank. But want to retain col5 as it is. I should convert only col1 to col4 to numeric and remove comma.
col1=c(1,45,30,35)
col2=c(33,"33,345",87,89)
col3=c("67,345",77,90,"reply")
col4=c("silver",43,23,55)
col5=c("gb","rt","dc","ty")
DF=data.frame(col1,col2,col3,col4,col5)
col6=c(1,45,30,35)
col7=c(33,33345,87,89)
col8=c(67345,77,90,"")
col9=c("",43,23,55)
col10=c("gb","rt","dc","ty")
DF_Output=data.frame(col6,col7,col8,col9,col10)
My expected output is like DF_Output. Please help me to solve this.