Re: [Rd] Function some()

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Sat 18 Sep 2004 - 04:37:50 EST

Gabor Grothendieck <ggrothendieck@myway.com> writes:

> data(iris)
> data(state)
>
> # Now we have:
>
> head(sample(iris)) # data frame
> head(sample(data.frame(state.x77))) # matrix
> head(sample(letters)) # vector

Nope. Think again:

> names(sample(iris))

[1] "Species" "Sepal.Width" "Sepal.Length" "Petal.Length" "Petal.Width"
> names(sample(iris))

[1] "Sepal.Length" "Species" "Petal.Width" "Petal.Length" "Sepal.Width"

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat Sep 18 04:42:26 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:16 EST