From rob.foxall at bbsrc.ac.uk  Wed Nov 30 12:00:46 2005
From: rob.foxall at bbsrc.ac.uk (rob.foxall@bbsrc.ac.uk)
Date: Wed, 30 Nov 2005 12:00:46 +0100 (CET)
Subject: [Rd] multinom crashes (when I do something stupid) (PR#8358)
Message-ID: <20051130110046.E256215AB4@slim.kubism.ku.dk>

Full_Name: Rob Foxall
Version: 2.2.0
OS: Windows XP
Submission from: (NULL) (149.155.96.5)


I was using multinom from nnet package, when I did something stupid -- I entered
in an incorrect factor variable as response. This factor had only one level.
Instead of R telling me not to be so dumb, it crashed, clicking on debug coming
up with the message "An exception 'Unhandled Win32 Exception' has occurred in
Rgui.exe." This has happened on both my laptop and desktop (it took me a while
to see my mistake!). It can be easily reproduced with made-up data, e.g.

library(nnet)
set.seed(1) # not really needed, but definitely crashes for this!
temp_g <- as.factor(rep("level1",10))
temp_x <- rnorm(10)
multinom(temp_g ~ temp_x)

Cheers,
Rob.



[Rd] multinom crashes (when I do something stupid) (PR#8358)
rob.foxall@bbsrc.ac.uk