Re: [Rd] Unicode whitespace

2008-01-04 Thread Prof Brian Ripley
I presume you want this only in a UTF-8 locale? Currently this is done by static int SkipSpace(void) { int c; while ((c = xxgetc()) == ' ' || c == '\t' || c == '\f') /* nothing */; return c; } in gram.c. We could make use of isspace and its wide-char equivalent iswspace.

[Rd] is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)

2008-01-04 Thread timh
is() does not catch parent S3 classes: > library(splines) > temp <- bs(1:99, df=5) > class(temp) [1] "bs""basis" > is(temp, "basis") [1] FALSE In contrast, is() does catch parent S4 classes: > library(copula) > norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7), +

Re: [Rd] checking whether the name space can be loaded with stated dependencies

2008-01-04 Thread hadley wickham
On 1/4/08, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > On 04/01/2008, hadley wickham <[EMAIL PROTECTED]> wrote: > > On 1/4/08, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > > What it is trying is > > > > > > % env R_DEFAULT_PACKAGES=NULL R > > > > > > > loadNamespace("ggplot2") > > > > > > The

[Rd] Addendum: nls (with SSlogis model and upper limit) never returns (PR#10548)

2008-01-04 Thread hendrik . weisser
Peter Dalgaard reminded me to be more specific about my computing platform; it's Debian 4.1.1-19 on a 32-bit Pentium 4 machine (Dell Optiplex GX620). The problem I described (nls not returning) also occurs with different data at other values of the scal parameter. Regards Hendrik Weisser --

Re: [Rd] checking whether the name space can be loaded with stated dependencies

2008-01-04 Thread Henrik Bengtsson
On 04/01/2008, hadley wickham <[EMAIL PROTECTED]> wrote: > On 1/4/08, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > What it is trying is > > > > % env R_DEFAULT_PACKAGES=NULL R > > > > > loadNamespace("ggplot2") > > > > The test is not new, so it would seem to be a change in ggplot2 since the >

Re: [Rd] checking whether the name space can be loaded with stated dependencies

2008-01-04 Thread Prof Brian Ripley
On Fri, 4 Jan 2008, hadley wickham wrote: > On 1/4/08, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> What it is trying is >> >> % env R_DEFAULT_PACKAGES=NULL R >> >>> loadNamespace("ggplot2") >> >> The test is not new, so it would seem to be a change in ggplot2 since the >> version on CRAN. My

Re: [Rd] Evaluating R expressions

2008-01-04 Thread Terry Therneau
All, Thank you for the prompt and useful answers to my questions. I had missed references in 5.7.6 which would have answered some of the points. As Bill pointed out a newer version of acrobat would help, but the Sun system here is still running 5.0. (An oversubscribed sysadmin). Then I

Re: [Rd] Evaluating R expressions from C

2008-01-04 Thread Robert Gentleman
Hi Terry, Terry Therneau wrote: > I am currently puzzled by a passage in the R Extensions manual, section 5.10: > > SEXP lapply(SEXP list, SEXP expr, SEXP rho) > { >R_len_t i, n = length(list); >SEXP ans; > >if(!isNewList(list)) error("`list' must be a list"); >

[Rd] Evaluating R expressions from C

2008-01-04 Thread Terry Therneau
I am currently puzzled by a passage in the R Extensions manual, section 5.10: SEXP lapply(SEXP list, SEXP expr, SEXP rho) { R_len_t i, n = length(list); SEXP ans; if(!isNewList(list)) error("`list' must be a list"); if(!isEnvironment(rho)) error("`rho' should

[Rd] Unicode whitespace

2008-01-04 Thread hadley wickham
It would be nice if R ignored more unicode white space characters. For example, if I have "\u2028" in a command (which I get from a line-break in keynote) I get the following error: > qplot(carat, price, data = diamonds, 
 colour=clarity) Error: unexpected input in "qplot(carat, price, data = di

Re: [Rd] nls (with SSlogis model and upper limit) never returns (PR#10544)

2008-01-04 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > Full_Name: Hendrik Weisser > Version: 2.6.1 > OS: Linux > Submission from: (NULL) (139.19.102.218) > > > The following computation never finishes and locks R up: > > >> values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, >> > 17.33, 14.97, 11

[Rd] nls (with SSlogis model and upper limit) never returns (PR#10544)

2008-01-04 Thread hendrik . weisser
Full_Name: Hendrik Weisser Version: 2.6.1 OS: Linux Submission from: (NULL) (139.19.102.218) The following computation never finishes and locks R up: > values <- list(x=10:30, y=c(23.85, 28.805, 28.195, 26.23, 25.005, 20.475, 17.33, 14.97, 11.765, 8.857, 5.3725, 5.16, 4.2105, 2.929, 2.174, 1.25,

Re: [Rd] checking whether the name space can be loaded with stated dependencies

2008-01-04 Thread hadley wickham
On 1/4/08, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > What it is trying is > > % env R_DEFAULT_PACKAGES=NULL R > > > loadNamespace("ggplot2") > > The test is not new, so it would seem to be a change in ggplot2 since the > version on CRAN. My guess is the your package is doing top-level > compu

Re: [Rd] checking whether the name space can be loaded with stated dependencies

2008-01-04 Thread Prof Brian Ripley
What it is trying is % env R_DEFAULT_PACKAGES=NULL R > loadNamespace("ggplot2") The test is not new, so it would seem to be a change in ggplot2 since the version on CRAN. My guess is the your package is doing top-level computations, which `Writing R Extensions' warns against: The R code f