[R] deparse: replacing all by \
Dear list, I need to use the function deparse in a specific situation. But, it always replace any occurence of by \. For example: arg - deparse(args(cov), width.cutoff = 100L)[1] arg [1] function (x, y = NULL, use = \everything\, method = c(\pearson\, \kendall\, \spearman\)) Some characters added by deparse are not desirable: \ before all and final space. How is the best way to get the result (using deparse) clean like below? [1] function (x, y = NULL, use = everything, method = c(pearson, kendall, spearman)) Any help is welcome! Best, -- ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ Jose Claudio Faria Estatistica UESC/DCET/Brasil joseclaudio.faria at gmail.com Telefones: 55(73)3680.5545 - UESC 55(73)9100.7351 - TIM 55(73)8817.6159 - OI ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] deparse: replacing all by \
On 13-10-29 7:42 PM, Jose Claudio Faria wrote: Dear list, I need to use the function deparse in a specific situation. But, it always replace any occurence of by \. No it doesn't. That's just how print() displays quotes. Use cat() and you can see what's really there. Duncan Murdoch For example: arg - deparse(args(cov), width.cutoff = 100L)[1] arg [1] function (x, y = NULL, use = \everything\, method = c(\pearson\, \kendall\, \spearman\)) Some characters added by deparse are not desirable: \ before all and final space. How is the best way to get the result (using deparse) clean like below? [1] function (x, y = NULL, use = everything, method = c(pearson, kendall, spearman)) Any help is welcome! Best, __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.