Re: [R] replace question mark with a dash

2010-04-25 Thread Tal Galili
Here you go :) require(stringr) t( apply(mydf, 1, function(x) {str_replace(x, "\\?", "-)")}) ) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co

[R] replace question mark with a dash

2010-04-25 Thread Felipe Carrillo
Hi: I have the following dataset in R( thanks Gabor for your help) but now the problem is that all the dashes are converted to questions marks ("?") I am trying to get the dashes back using: mydf <- data.frame(lapply(mydf,function(x) replace(mydf,"?"(x),"-"))) but isn't working. I also tried: