replace tabs with "" in R dataframe -
i have large dataframe (df) has couple of unwanted tabs. need replace tabs empty string parsing work.
i have tried following , neither works:
df[ df == "\t" ] = "" (tried both "\t" , "\\t") df <- as.data.frame(sapply(df, function(x) gsub("\\t", "", x))) df<- data.frame(apply((df),margin = 2,function(x){gsub("\\t","",x,fixed = true)}),stringsasfactors=false)
Comments
Post a Comment