[R] Problem with R-1.9.1 under Solaris 2.6

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Sep 17 06:34:25 CEST 2004

On Fri, 17 Sep 2004 Ray.Lindsay at abare.gov.au wrote:

> Hi
> I have installed R-1.9.1 on an 6 year old Sun running Solaris 2.6. After some initial failures to compile I used the :
> gcc 
> f77
> compilers with gnu make. [could not get gcc 3.4.1 to compile]
>  All but one of the .c programs compiled 
> [that being src/main/connections.c which I manually compiled using cc] 
and the 

Out of curiosity, what was the error with ancient gcc?

> make check 
> tests all worked [apart from the internet]. 
> However I get the following, where weight is a column vector :

There is no such thing in R (only vectors and 1D arrays).  What does
str(weight) say?  Here's my guess:

weight <- data.frame(x=rnorm(38))

reproduces your error.  So I think you have a one-column data frame, and 
you meant weight[[1]] (or weight[, 1] or weight[1]).

Next, why are you calling as.single?  This is not in the context which the 
help page says is the *only* place it should be used.

> > np <- sum(weight)
> > n <- nrow(weight)
> > weight <- as.single((n*weight)/np)
> Error in structure(.Internal(as.vector(x, "double")), Csingle = TRUE) :
>         (list) object cannot be coerced to double
> > dim(weight)
> [1] 38  1

Brian D. Ripley,                  ripley at stats.ox.ac.uk
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, UK                Fax:  +44 1865 272595

More information about the R-help mailing list