Re: [Rd] A possible improvement to apropos
Hi Seth, > "Seth" == Seth Falcon <[EMAIL PROTECTED]> > on Wed, 13 Dec 2006 16:38:02 -0800 writes: Seth> Hello all, I've had the following apropos alternative Seth> in my ~/.Rprofile for some time, and have found it Seth> more useful than the current version. Basically, my Seth> version ignores case when searching. Seth> If others find this useful, perhaps apropos could be Seth> suitably patched (and I'd be willing to create such a Seth> patch). Could you live with typing 'i=T' (i.e. ignore.case=TRUE)? In principle, I'd like to keep the default as ignore.case=FALSE, since we'd really should teach the users that R *is* case sensitive. Ignoring case is the exception in the S/R/C world, not the rule I have a patch ready which implements your suggestion (but not quite with the code below), but as said, not as default. Martin Seth> + seth Seth> Here is my version of apropos: >> APROPOS <- function (what, where = FALSE, mode = "any") >> { >> if (!is.character(what)) >> stop("argument ", sQuote("what"), " must be a character vector") >> x <- character(0) >> check.mode <- mode != "any" >> for (i in seq(search())) { >> contents <- ls(pos = i, all.names = TRUE) >> found <- grep(what, contents, ignore.case = TRUE, value = TRUE) >> if (length(found)) { >> if (check.mode) { >> found <- found[sapply(found, function(x) { >> exists(x, where = i, mode = mode, inherits = FALSE) >> })] >> } >> numFound <- length(found) >> x <- c(x, if (where) >>structure(found, names = rep.int(i, numFound)) else found) >> } >> } >> x >> } __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Phonetic symbols (IPA) in R graphics
Hi Paul, I tried the following from your slides, perhaps you can see the error: 1) I downloaded the fonts and the encoding file into the directories Type1 and encodings (in my current directory) 2) I ran R from the same directory (ver 2.4.0) 3) I added the font mapping for the pdf and postscript devices: ipa <- Type1Font("InternationalPhoneticAlphabet", c("Type1/tipa10.afm", "Type1/tipabx10.afm", "Type1/tipasi10.afm", "Type1/tipabx10.afm"), "encodings/silipa.enc") pdfFonts(ipa=ipa) postscriptFonts(ipa=ipa) 4) I created a simple figure: plot(10,10,type="n") text(10,10,"whatever",family="InternationalPhoneticAlphabet") Here I get 13 warnings of the type: "font family not found in X11 font database" As far as I understand this is because I defined the fonts only for the postscript and pdf devices. 5) I copy the device to postscript: dev.copy2eps(file="whatever.eps") Here I get the real problem: Error in dev.copy(file = "whatever.eps", device = function (file = ifelse(onefile, : invalid character sent to 'PostScriptCIDMetricInfo' in a single-byte locale I googled for PostScriptCIDMetricInfo but only found a few pages in Japanese, can you help me? Thanks, Giampiero I can put the font and encoding files somewhere if necessary. I am working on a RedHat linux computer with locale: LANG=en_US.iso88591 LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=C On Thu, 14 Dec 2006, Paul Murrell wrote: > Hi > > > Giampiero Salvi wrote: > > Hi all, > > I would like to add phonetic symbols in my figures. Usually I typeset > > my documents in LaTeX and I use the tipa [1] package to get > > International Phonetic Alphabet (IPA) fonts. So, my problem would be > > solved if I could insert LaTeX commands in the text() function (I > > guess at least). > > > > I would like to avoid using psfrag (that is, inserting a string in > > the eps figure and then substituting it with the right symbol with > > dvips) because I would like to work with pdf pictures and pdflatex > > as well as latex -> dvips -> ps2pdf. > > > Take a look at ... > > Fonts, lines, and transparency in R graphics. R News, 4(2):5-9, > September 2004. > > Non-standard fonts in PostScript and PDF graphics. R News, 6(2):41-47, > May 2006. > > http://www.stat.auckland.ac.nz/~paul/Talks/fonts.pdf > > Paul > > > > If inserting special fonts is not possible at the moment, I would > > appreciate some hints on how I could go about modifying text() to > > include this feature. (This is why I post to r-devel instead of > > r-help) > > > > Thank you! > > Giampiero > > > > [1] http://www.essex.ac.uk/linguistics/clmt/latex4ling/tipa/ > > > > __ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] A possible improvement to apropos
I would second Seth here, because the search is case insensitive but results are not. This is not strictly related to the language. For example, on my shell, the last entries of apropos system are xload(1) - system load average display for X xlogo(1) - X Window System logo xman(1) - Manual page display program for the X Window System which I find a reasonable result. stefano On 14/dic/06, at 17:45, Martin Maechler wrote: > Hi Seth, > >> "Seth" == Seth Falcon <[EMAIL PROTECTED]> >> on Wed, 13 Dec 2006 16:38:02 -0800 writes: > > Seth> Hello all, I've had the following apropos alternative > Seth> in my ~/.Rprofile for some time, and have found it > Seth> more useful than the current version. Basically, my > Seth> version ignores case when searching. > > Seth> If others find this useful, perhaps apropos could be > Seth> suitably patched (and I'd be willing to create such a > Seth> patch). > > Could you live with typing 'i=T' (i.e. ignore.case=TRUE)? > > In principle, I'd like to keep the default as ignore.case=FALSE, > since we'd really should teach the users that R > *is* case sensitive. > Ignoring case is the exception in the S/R/C world, not the rule > > I have a patch ready which implements your suggestion > (but not quite with the code below), but as said, not as > default. > > Martin > > Seth> + seth > > Seth> Here is my version of apropos: > >>> APROPOS <- function (what, where = FALSE, mode = "any") >>> { >>> if (!is.character(what)) >>> stop("argument ", sQuote("what"), " must be a character >>> vector") >>> x <- character(0) >>> check.mode <- mode != "any" >>> for (i in seq(search())) { >>> contents <- ls(pos = i, all.names = TRUE) >>> found <- grep(what, contents, ignore.case = TRUE, value = >>> TRUE) >>> if (length(found)) { >>> if (check.mode) { >>> found <- found[sapply(found, function(x) { >>> exists(x, where = i, mode = mode, inherits = >>> FALSE) >>> })] >>> } >>> numFound <- length(found) >>> x <- c(x, if (where) >>>structure(found, names = rep.int(i, numFound)) >>> else found) >>> } >>> } >>> x >>> } > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] A possible improvement to apropos
Martin Maechler <[EMAIL PROTECTED]> writes: > Hi Seth, > Could you live with typing 'i=T' (i.e. ignore.case=TRUE)? I can live with my ~/.Rprofile, I suppose. :-) > In principle, I'd like to keep the default as ignore.case=FALSE, > since we'd really should teach the users that R > *is* case sensitive. > Ignoring case is the exception in the S/R/C world, not the rule Let me try to argue why I think the default should be case insensitive. This is a _search_ function. If you aren't even sure what something is called, how can you expect to know how it will be capitalized? Making search functions less likely to return what the user is looking for seems quite odd to me. Learning what functions are available has higher precedence, IMO, than being reminded about case sensitivity. Imagine a user hoping to find 'getClass' that doesn't always remember case-sensitivity rules: apropos("class") ## Doesn't find the function at all. ## Writes a message to R-help without reading the posting guide APROPOS("class") ## user: "oh, that looks like what I want" getclass("foo") ## user: "why didn't it work?" ... "ah, maybe I have to spell ## it exactly" getClass("foo") ## happy user Remember, the _results_ will be displayed in proper case and a common next step (should be) to read the man page and possibly try an example -- especially if a first attempt fails. Have I made any progress? Regards, + seth __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Detecting compilation under R
The docs tell me: "The header files define USING_R, which should be used to test if the code is indeed being used with R." but surely you only get that if you #include , which you can only do if you are using R. If you have code that you might want to compile in R and for other purposes, how can you detect this? As an example, suppose I have some C that uses GSL to get a random number if its a standalone program, or uses R's internals if its being compiled to run in R. I want to do something like: #ifdef USING_R #include #else #include #endif and then: #ifdef USING_R x = rand_unif(0.0,1.0); #else x = gsl_runif(0.0,1.0); #endif (cant remember the exact names but hopefully you get the idea). This fails because USING_R is only set when R.h is included. Are there any preprocessor definitions set by R CMD SHLIB and R CMD BUILD that I can test against? Of course I can stick PKG_CFLAGS=-DYES_THIS_IS_USING_R in Makevars, but I just wondered if there was a default solution I'd missed. Or if it was a good idea anyway. Barry __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Detecting compilation under R
Prof Brian Ripley wrote: > If *no* R.h is around: easy to solve. Have a dummy R.h somewhere? > What is BUILD? Oh, pardon me for forgetting the arbitrary capitalisation of R CMD thingies. Can someone come up with a mnemonic for remembering that BATCH, COMPILE, SHLIB, INSTALL, LINK and REMOVE are all caps, that build, check, and config are lower case, and everything else has initial caps? Except for Sd2Rd. (Yes, R --help tells you). > You've clipped it from my previous mail, with no indication. As the > posting guide points out, this is reprehensible. This bit? #include #ifdef USING_R x = rand_unif(0.0,1.0); #else #include x = gsl_runif(0.0,1.0); #endif USING_R is only useful here if you can make #include not include the official R.h file and not give a 'file not found' error message. I cant see how to do this without requiring either a dummy R.h file somewhere or options on the C command line. This would then be better done with cc -DR_CODE and then use #ifdef R_CODE to include R.h. Then USING_R is meaningful. Here's what I'd like to do. Give someone a file 'simple.c' and say: "Compile it with 'cc -o simple simple.c -lgsl' and then run from the command line, or do 'R CMD SHLIB simple.c', then do a dyn.load and a .C() call'." if "R CMD SHLIB" and "R CMD build" set a preprocessor flag then this could be done. You could even have -DRSHLIB and -DRbuild on the command line to give it a bit more intelligence. My behaviour may be reprehensible but sometimes your responses seem cryptic to the point of incomprehensible. Barry __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Detecting compilation under R
On Thu, 14 Dec 2006, Barry Rowlingson wrote: > The docs tell me: > > "The header files define USING_R, which should be used to test if the > code is indeed being used with R." > > but surely you only get that if you #include , which you can only Nope, also if you include , which you can do under either R or S(-PLUS). You got this from the API section in 'Writing R Extensions', and are quoting out of context. > do if you are using R. If you have code that you might want to compile > in R and for other purposes, how can you detect this? > > As an example, suppose I have some C that uses GSL to get a random > number if its a standalone program, or uses R's internals if its being > compiled to run in R. I want to do something like: > > #ifdef USING_R > #include > #else > #include > #endif > > and then: > > #ifdef USING_R > x = rand_unif(0.0,1.0); > #else > x = gsl_runif(0.0,1.0); > #endif > > (cant remember the exact names but hopefully you get the idea). This > fails because USING_R is only set when R.h is included. So the problem is that you needed rather #include #ifdef USING_R x = rand_unif(0.0,1.0); #else #include x = gsl_runif(0.0,1.0); #endif since if R.h is not around, the include will not include it. > Are there any preprocessor definitions set by R CMD SHLIB and R CMD > BUILD that I can test against? > > Of course I can stick PKG_CFLAGS=-DYES_THIS_IS_USING_R in Makevars, > but I just wondered if there was a default solution I'd missed. Or if it > was a good idea anyway. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Detecting compilation under R
> So the problem is that you needed rather > > #include > #ifdef USING_R > x = rand_unif(0.0,1.0); > #else > #include > x = gsl_runif(0.0,1.0); > #endif > > since if R.h is not around, the include will not include it. > If R.h is not around, the preprocessor will throw a tantrum: cc-c -o simple.o simple.c simple.c:2:15: error: R.h: No such file or directory - all of which would be solved if SHLIB and BUILD set a preprocessor flag to indicate compilation by R. I dont see what use USING_R is. If you #include you get it, but then you know you're USING_R because you included R.h, hence USING_R is going to always be defined in that code (unless the inclusion of R.h is conditional on something else...). Oh but of course I've missed something... Just tell me what... Barry __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Detecting compilation under R
On Thu, 14 Dec 2006, Barry Rowlingson wrote: [Silently discarding the answer to his question, and breaching 'fair use' copyright provisions.] >> So the problem is that you needed rather >> >> #include >> #ifdef USING_R >> x = rand_unif(0.0,1.0); >> #else >> #include >> x = gsl_runif(0.0,1.0); >> #endif >> >> since if R.h is not around, the include will not include it. > If R.h is not around, the preprocessor will throw a tantrum: If *no* R.h is around: easy to solve. > cc-c -o simple.o simple.c > simple.c:2:15: error: R.h: No such file or directory > > - all of which would be solved if SHLIB and BUILD set a preprocessor flag to > indicate compilation by R. What is BUILD? > I dont see what use USING_R is. If you #include you get it, but then > you know you're USING_R because you included R.h, hence USING_R is going to > always be defined in that code (unless the inclusion of R.h is conditional on > something else...). > > Oh but of course I've missed something... Just tell me what... You've clipped it from my previous mail, with no indication. As the posting guide points out, this is reprehensible. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] A possible improvement to apropos
I would vastly prefer apropos to be case insensitive by default. The point of it is to find things similar to a string, not the same as, and given that capitalization in R is somewhat erratic (due to many authors, and some of those changing their minds over the years), I find the current apropos of little use. I would also, personally prefer some sort of approximate matching since there are different ways to spell some words, and some folks abbreviate parts of words. Martin Maechler wrote: > Hi Seth, > >> "Seth" == Seth Falcon <[EMAIL PROTECTED]> >> on Wed, 13 Dec 2006 16:38:02 -0800 writes: > > Seth> Hello all, I've had the following apropos alternative > Seth> in my ~/.Rprofile for some time, and have found it > Seth> more useful than the current version. Basically, my > Seth> version ignores case when searching. > > Seth> If others find this useful, perhaps apropos could be > Seth> suitably patched (and I'd be willing to create such a > Seth> patch). > > Could you live with typing 'i=T' (i.e. ignore.case=TRUE)? > > In principle, I'd like to keep the default as ignore.case=FALSE, > since we'd really should teach the users that R > *is* case sensitive. > Ignoring case is the exception in the S/R/C world, not the rule > > I have a patch ready which implements your suggestion > (but not quite with the code below), but as said, not as > default. > > Martin > > Seth> + seth > > Seth> Here is my version of apropos: > >>> APROPOS <- function (what, where = FALSE, mode = "any") >>> { >>> if (!is.character(what)) >>> stop("argument ", sQuote("what"), " must be a character vector") >>> x <- character(0) >>> check.mode <- mode != "any" >>> for (i in seq(search())) { >>> contents <- ls(pos = i, all.names = TRUE) >>> found <- grep(what, contents, ignore.case = TRUE, value = TRUE) >>> if (length(found)) { >>> if (check.mode) { >>> found <- found[sapply(found, function(x) { >>> exists(x, where = i, mode = mode, inherits = FALSE) >>> })] >>> } >>> numFound <- length(found) >>> x <- c(x, if (where) >>>structure(found, names = rep.int(i, numFound)) else >>> found) >>> } >>> } >>> x >>> } > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 [EMAIL PROTECTED] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Phonetic symbols (IPA) in R graphics
Hi Giampiero Salvi wrote: > Hi Paul, > I tried the following from your slides, perhaps you can see the > error: > > 1) I downloaded the fonts and the encoding file into the directories >Type1 and encodings (in my current directory) > 2) I ran R from the same directory (ver 2.4.0) > 3) I added the font mapping for the pdf and postscript devices: > > ipa <- Type1Font("InternationalPhoneticAlphabet", > c("Type1/tipa10.afm", >"Type1/tipabx10.afm", >"Type1/tipasi10.afm", >"Type1/tipabx10.afm"), > "encodings/silipa.enc") > pdfFonts(ipa=ipa) > postscriptFonts(ipa=ipa) > > 4) I created a simple figure: > > plot(10,10,type="n") > text(10,10,"whatever",family="InternationalPhoneticAlphabet") > > Here I get 13 warnings of the type: > "font family not found in X11 font database" > As far as I understand this is because I defined the fonts only for > the postscript and pdf devices. Exactly. The process would be simpler if you drew directly to PostScript or PDF via postscript() or pdf(). Also, the text() call should be ... text(10,10,"whatever",family="ipa") > 5) I copy the device to postscript: > > dev.copy2eps(file="whatever.eps") > > Here I get the real problem: > Error in dev.copy(file = "whatever.eps", device = function (file = > ifelse(onefile, : > invalid character sent to 'PostScriptCIDMetricInfo' in a > single-byte locale > > I googled for PostScriptCIDMetricInfo but only found a few pages in > Japanese, can you help me? I'm not sure how you got there. You've specified the family wrong so I would expect more "family not found" warnings. Let me know if this persists with the correct family specified. Paul > Thanks, > Giampiero > > I can put the font and encoding files somewhere if necessary. > I am working on a RedHat linux computer with locale: > LANG=en_US.iso88591 > LC_CTYPE="C" > LC_NUMERIC="C" > LC_TIME="C" > LC_COLLATE="C" > LC_MONETARY="C" > LC_MESSAGES="C" > LC_PAPER="C" > LC_NAME="C" > LC_ADDRESS="C" > LC_TELEPHONE="C" > LC_MEASUREMENT="C" > LC_IDENTIFICATION="C" > LC_ALL=C > > > On Thu, 14 Dec 2006, Paul Murrell wrote: > >> Hi >> >> >> Giampiero Salvi wrote: >>> Hi all, >>> I would like to add phonetic symbols in my figures. Usually I typeset >>> my documents in LaTeX and I use the tipa [1] package to get >>> International Phonetic Alphabet (IPA) fonts. So, my problem would be >>> solved if I could insert LaTeX commands in the text() function (I >>> guess at least). >>> >>> I would like to avoid using psfrag (that is, inserting a string in >>> the eps figure and then substituting it with the right symbol with >>> dvips) because I would like to work with pdf pictures and pdflatex >>> as well as latex -> dvips -> ps2pdf. >> >> Take a look at ... >> >> Fonts, lines, and transparency in R graphics. R News, 4(2):5-9, >> September 2004. >> >> Non-standard fonts in PostScript and PDF graphics. R News, 6(2):41-47, >> May 2006. >> >> http://www.stat.auckland.ac.nz/~paul/Talks/fonts.pdf >> >> Paul >> >> >>> If inserting special fonts is not possible at the moment, I would >>> appreciate some hints on how I could go about modifying text() to >>> include this feature. (This is why I post to r-devel instead of >>> r-help) >>> >>> Thank you! >>> Giampiero >>> >>> [1] http://www.essex.ac.uk/linguistics/clmt/latex4ling/tipa/ >>> >>> __ >>> R-devel@r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-devel >> -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 [EMAIL PROTECTED] http://www.stat.auckland.ac.nz/~paul/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] [R] Segfault in pure R code
On 12/13/06, Peter Dalgaard <[EMAIL PROTECTED]> wrote: [...] > Ouch. Call the marines... > > The error comes from the garbage collector, which means that something > got corrupted in internal data structures some time previously. > > The most important thing is to preserve the bug. Rebuild anything and > the symptom disappears, but the bug will still be there. So keep the R > binary, the script, and the .RData file around. I moved the relevant files to a new, empty directory to keep things clean, and it resulted in a variation of the error: ++ > library(xtable) > ?xtable) Error: syntax error in "?xtable)" > ?xtable > help.start() Making links in per-session dir ... If '/usr/bin/firefox' is already running, it is *not* restarted, and you must switch to its window. Otherwise, be patient ... > library(bemanning) > load("bemanning07-32.rda") > courses("Ingrid") Error in attributes(.Data) <- c(attributes(.Data), attrib) : value of 'SET_ATTRIB' must be a pairlist or NULL, not a 'raw' > gu Program received signal SIGSEGV, Segmentation fault. 0x08148cd0 in Rstrlen (s=0x0, quote=34) at printutils.c:342 342 return Rstrwid(CHAR(s), LENGTH(s), quote); ('gu' is a data frame in 'bemanning07-32.rda', used by 'courses') Does that throw any light on the matters? Also tried to move things to my job machine, with other versions of R and bemanning, but no errors there. Göran __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] [R] Segfault in pure R code
On 12/14/06, Göran Broström <[EMAIL PROTECTED]> wrote: > On 12/13/06, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > > [...] > > > Ouch. Call the marines... > > > > The error comes from the garbage collector, which means that something > > got corrupted in internal data structures some time previously. > > > > The most important thing is to preserve the bug. Rebuild anything and > > the symptom disappears, but the bug will still be there. So keep the R > > binary, the script, and the .RData file around. > > I moved the relevant files to a new, empty directory to keep things Sorry, *copied*, not moved! Göran __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Phonetic symbols (IPA) in R graphics
Hi Paul, first thank you for helping out. On Fri, 15 Dec 2006, Paul Murrell wrote: > Exactly. The process would be simpler if you drew directly to > PostScript or PDF via postscript() or pdf(). > > Also, the text() call should be ... > > text(10,10,"whatever",family="ipa") [...] > I'm not sure how you got there. You've specified the family wrong so I > would expect more "family not found" warnings. Let me know if this > persists with the correct family specified. Strangely enough I get the "family 'ipa' not included in PostScript device" if I run text(10,10,"whatever",family="ipa") while the "PostScriptCIDMetricInfo" error if I run text(10,10,"whatever",family="InternationalPhoneticAlphabet"") I get the same behaviour when I write directly to the postscript device: postscript(file="whatever.eps") plot(10,10,type="n") text(10,10,"whatever",family="InternationalPhoneticAlphabet") or text(10,10,"whatever",family="ipa") I suspect the "PostScriptCIDMetricInfo" error depends on the fact the the encodings/silipa.enc file contains all values from 33 to 255 (with a few undefines values). Can that be possible? Thanks, Giampiero __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] [R] Segfault in pure R code
On 12/13/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > That's in the memory manager and indicates prior memory corruption. > Please re-run under valgrind, plus gctorture(TRUE) if needed. I did, no errors (but slow)! > However, I would start by seeing if this occurs in a single-byte domain if > this was in a UTF-8 domain. Experience suggests that we have some flakier > code in the less-used MBCS pathways. It was/is NOT run in UTF-8. Göran __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] A possible improvement to apropos
> "Seth" == Seth Falcon <[EMAIL PROTECTED]> > on Thu, 14 Dec 2006 07:16:30 -0800 writes: Seth> Martin Maechler <[EMAIL PROTECTED]> writes: >> Hi Seth, Could you live with typing 'i=T' (i.e. >> ignore.case=TRUE)? Seth> I can live with my ~/.Rprofile, I suppose. :-) >> In principle, I'd like to keep the default as >> ignore.case=FALSE, since we'd really should teach the >> users that R *is* case sensitive. Ignoring case is the >> exception in the S/R/C world, not the rule Seth> Let me try to argue why I think the default should be Seth> case insensitive. Seth>This is a _search_ function. If you aren't even Seth> sure what something is called, how can you expect to Seth> know how it will be capitalized? Making search Seth> functions less likely to return what the user is Seth> looking for seems quite odd to me. okay, okay, yes, you've convinced me. Thank you (and everyone else) for the feedback! So the change will be {non-back-compatibly !} to ignore case in apropos() For find() -- on the same help page, similar topic -- it's less clear if a change should happen along similar lines. Changing the *default* there is more problematic, since find() is used, e.g., in getAnywhere(). I will probably not get to commit my changes before the weekend, BTW. Martin Seth>Learning what functions are available has higher Seth> precedence, IMO, than being reminded about case Seth> sensitivity. Imagine a user hoping to find 'getClass' Seth> that doesn't always remember case-sensitivity rules: Seth>apropos("class") ## Doesn't find the function Seth> at all. ## Writes a message to R-help without reading Seth> the posting guide Seth>APROPOS("class") ## user: "oh, that looks like Seth> what I want" getclass("foo") ## user: "why didn't it Seth> work?" ... "ah, maybe I have to spell ## it exactly" Seth> getClass("foo") ## happy user Seth>Remember, the _results_ will be displayed in proper Seth> case and a common next step (should be) to read the Seth> man page and possibly try an example -- especially if Seth> a first attempt fails. Seth> Have I made any progress? indeed! __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel