R-beta: data(foo) - Error in sub(... --- need "r[ege]x[p]" library
gordon.harrington at uni.edu
Wed Jun 24 06:40:00 CEST 1998
Martin Maechler replies:>
> I cannot see your problem, i.e., data(iris) ... works just fine,
> even though I use SPARC Solaris 2.x (2.5, not 2.4) as well.
> >>>>> "gordon" == gordon harrington <gordon.harrington at uni.edu> writes:
> gordon> R-0.62.1 sparc-sun-solaris2.4:
> gordon> demo(graphics) stops at:
> >> data("iris")
> gordon> Error in sub(pattern, replacement, x, ignore.case, extended) :
> gordon> invalid regular expression
> Can you try these two examples?
> > sub("a","AA", "a cat in the hat")
>  "AA cat in the hat"
> > gsub("a","AA", "a cat in the hat")
>  "AA cAAt in the hAAt"
> If they fail as well, it'll mean that during R installation,
> the "./configure" script couldn't find a proper
> ``regular expression library''.
They do fail! But--regex and regcmp are in the Solaris2.4 library, libgen.a
> When you run ./configure
> you should get a line
> checking for regcomp... (cached) yes
> ^^^^^^^^ === <<<< you need this for sub(), gsub()
configure does generate this output line on this system.
Nothing in the make output indicates any difficulty in finding regex during
compile and load so I can't tell where it is failing to load regex if that is
Gordon M. Harrington Mail: 3720 Village Place, #6308
Professor Emeritus Waterloo, IA 50702-5848
University of Northern Iowa Phone: 319-291-8535
gordon.harrington at uni.edu Fax: 319-291-8324
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help