Try this:
noquote(lm(y ~ X2 + X3 + X4))
To remove X characters:
gsub(^.|.$, , lm(y ~ X2 + X3 + X4))
On Tue, Dec 14, 2010 at 6:27 PM, Mark Na mtb...@gmail.com wrote:
Hi R-helpers,
I have a character string, for example:
lm(y ~ X2 + X3 + X4)
from which I would like to strip off the
Mark -
Since regular expressions in R are just character
strings, it's pretty easy to assemble a regular expression
to delete leading or trailing characters. For example:
delchars = function(str,n,lead=TRUE){
+dots = paste(rep('.',n),collapse='')
+pat =
2 matches
Mail list logo