Re: [R] How to remove $ (Dollar sign) from string

2012-04-22 Thread Giuseppe Marinelli
In data martedì 10 aprile 2012 13:34:13, Nevil Amos ha scritto:
 How do I remove a $ character from a string sub() and gsub() with $ or
 \$ as pattern do not work.
 
  sub($,,ABC$DEF)
 
 [1] ABC$DEF
 
  sub(\$,,ABC$DEF)
 
 Error: '\$' is an unrecognized escape in character string starting \$
 
  sub(\$,,ABC$DEF)
 
 Error: unexpected input in sub(\
 
 Thanks

You just need a double backslash:
 sub(\\$,,ABC$DEF)
[1] ABCDEF

__
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] Hausman test for endogeneity

2010-10-09 Thread Giuseppe Marinelli
On Saturday 09 October 2010 14:37:35 Holger Steinmetz wrote:
 Dear folks,

 can anybody point me in the right direction on how to conduct a hausman
 test for endogeneity in simultanous equation models?

 Best,
 Holger

hausman.systemfit [1] should be what you are looking for.
Cheers

Giuseppe

[1] http://cran.r-project.org/web/packages/systemfit/systemfit.pdf

__
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.