From ripley at stats.ox.ac.uk  Fri Feb 18 15:08:22 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Feb 18 15:09:04 2005
Subject: [Rd] contrasts (PR#7695)
In-Reply-To: <20050218125311.8E4558E5D@slim.kubism.ku.dk>
References: <20050218125311.8E4558E5D@slim.kubism.ku.dk>
Message-ID: <Pine.LNX.4.61.0502181404441.5419@gannet.stats>

Do you have an example we can use to test a fix?  I can only guess at what 
you supplied for `mat'.

R doesn't really have `storage mode': and "single" should be fine.
I guess (but only guess) you had an integer matrix.

On Fri, 18 Feb 2005 david.clayton@cimr.cam.ac.uk wrote:

> Full_Name: David Clayton
> Version: 2.0.1
> OS: Linux
> Submission from: (NULL) (131.111.126.242)
>
>
> Setting contrasts for a factor to be used in a model by
>
> contrasts(fact, how.many) <- mat
>
> where mat is a matrix does not coerce mat into storage mode "double". The
> resultant model.matrix is garbage.

-- 
Brian D. Ripley,                  ripley@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


[Rd] contrasts (PR#7695)
Prof Brian Ripley