Article View: aus.stats.s
Article #16101Re: huh?
From: Bill Venables
Date: Thu, 09 Jan 1992 23:50
Date: Thu, 09 Jan 1992 23:50
57 lines
2141 bytes
2141 bytes
In article <9201092107.AA20149@umnstat.stat.umn.edu>
charlie@umnstat.stat.umn.edu (Charles Geyer) writes:
:
: Fiddling with the new new S or whatever it's called.
:
: > x <- cbind(rep(0:1,4), rep(c(0,0,1,1), 2), c(rep(0,4), rep(1,4)))
: > x
: rep(0:1, 4) Y2 Y3
: [1,] 0 0 0
: [... &c
Not on my machine (Sun, SPARC IPC):
> x <- cbind(rep(0:1,4), rep(c(0,0,1,1), 2), c(rep(0,4), rep(1,4)))
> x
[,1] [,2] [,3]
[1,] 0 0 0
[2,] 1 0 0
[3,] 0 1 0
[4,] 1 1 0
[5,] 0 0 1
[6,] 1 0 1
[7,] 0 1 1
[8,] 1 1 1
>
Just like the good old days.
However you should try
> expand.grid(0:1, 0:1, 0:1)
and see what you get. The result is a data frame rather than a matrix.
:
: Would someone who's bought the new book please explain to me why I
: should like these fancy new dimnames? Old new S doesn't have this
: feature.
:
No, I can't. But if you want to see the default names that annoy me, try
this kind of thing:
> Charlie <- rnorm(100)
> Bert <- rnorm(100)
> Fred <- (1 + Bert + Charlie)^2 + rnorm(100)
> fit.mod <- lm(Fred ~ poly(Bert, Charlie, 2))
> summary(fit.mod)
How do you fix it (gracefully)? I would prefer just to have the digits at
the end of the name.
--
Bill Venables, Dept. of Statistics, | Email: venables@stats.adelaide.edu.au
Univ. of Adelaide, South Australia. | Tel: +61 8 228 5412 Fax: ...232 5670
Technical Details
Message-ID:
<WVENABLE.92Jan10102031@spam.ua.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!spam!spam.ua.oz.au!wvenableReferences:
<9201092107.AA20149@umnstat.stat.umn.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa931,7b93c597d8e362e X-Google-Attributes: gidfa931,public X-Google-ArrivalTime: 1992-01-09 16:16:56 PST Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!spam!spam.ua.oz.au!wvenable From: wvenable@spam.ua.oz.au (Bill Venables) Newsgroups: aus.stats.s Subject: Re: huh? Message-ID: <WVENABLE.92Jan10102031@spam.ua.oz.au> Date: 9 Jan 92 23:50:31 GMT References: <9201092107.AA20149@umnstat.stat.umn.edu> Sender: wvenable@spam.ua.oz Organization: Adelaide University. Lines: 57 In-reply-to: charlie@umnstat.stat.umn.edu's message of 9 Jan 92 21:40:06 GMT