It is a bug (which has been seen before). Just use title to add the main title afterwards. On Tue, 18 Nov 2003, Jean Vidal wrote:> I tried this : > > mosaicplot(stoc ~ q9r + segca,data=tmp2,color=T) : works fine. > > And now, this : > > mosaicplot(stoc ~ q9r + segca, data=tmp2, color=T, main="Big title") > Error in model.frame(formula, rownames, variables, varnames, extras, > extranames, : > invalid variable type > > I'm probably stupid and missed something simple in the manual (and wouldn't > like to be flamed if insinuating that, may be... a bug ? Oh no !). > > It can be done with : > > mosaicplot(table(tmp2$stoc,tmp2$q9r,tmp2$segca),color=T,main="Big > title") : works fine. > > So, no real trouble for me... > > > version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 1 > minor 8.0 > year 2003 > month 10 > day 08 > language R > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > >-- 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
I tried this :> mosaicplot(stoc ~ q9r + segca,data=tmp2,color=T) : works fine.And now, this :> mosaicplot(stoc ~ q9r + segca, data=tmp2, color=T, main="Big title")Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : invalid variable type I'm probably stupid and missed something simple in the manual (and wouldn't like to be flamed if insinuating that, may be... a bug ? Oh no !). It can be done with :> mosaicplot(table(tmp2$stoc,tmp2$q9r,tmp2$segca),color=T,main="Big title") : works fine.So, no real trouble for me...> version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 8.0 year 2003 month 10 day 08 language R
Jean: On Tue, 18 Nov 2003 23:32:05 Jean Vidal wrote:> I tried this : > > mosaicplot(stoc ~ q9r + segca,data=tmp2,color=T) : works fine. > > And now, this : > > mosaicplot(stoc ~ q9r + segca, data=tmp2, color=T, main="Big title") > Error in model.frame(formula, rownames, variables, varnames, extras, > extranames, : > invalid variable type > > I'm probably stupid and missed something simple in the manual (and > wouldn't like to be flamed if insinuating that, may be... a bug ? Oh > no !).OK, so you're getting flamed for something else: 1. Your example is not reproducible because you didn't provide the data (or use artificial data or ...)! If I use tmp2 <- data.frame(stoc = gl(2, 1, 8), q9r = gl(2, 2, 8), segca = gl(2, 4, 8)) the above works correct. But then again... 2. ...your R version is ancient, please upgrade before posting such requests! 3. Please read the posting guide. Best, Z> It can be done with : > > mosaicplot(table(tmp2$stoc,tmp2$q9r,tmp2$segca),color=T,main="Big > > title") : works fine. > > So, no real trouble for me... > > > version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 1 > minor 8.0 > year 2003 > month 10 > day 08 > language R > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >