On Fri, 17 Sep 2004 [EMAIL PROTECTED] 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 2.7.2.3 
> 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,                  [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, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to