Try this:
split(iris, factor(a, levels = 1:3))
On Mon, Oct 13, 2008 at 1:06 PM, Jay <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'll use part of the iris dataset for an example of what I want to
> do.
>
>> data(iris)
>> iris<-iris[1:10,1:4]
>> iris
> Sepal.Length Sepal.Width Petal.Length Petal.Widt
Thanks so much.
On Oct 13, 1:14 pm, "Henrique Dallazuanna" <[EMAIL PROTECTED]> wrote:
> Try this:
>
> a<-factor(c(3, 3, 3, 2, 3, 2, 2, 3, 2, 3), levels = 1:3)
> split(iris, a)
>
> lapply(split(iris, a), dim)
>
>
>
> On Mon, Oct 13, 2008 at 2:06 PM, Jay <[EMAIL PROTECTED]> wrote:
> > Hello,
>
> > I
Try this:
a<-factor(c(3, 3, 3, 2, 3, 2, 2, 3, 2, 3), levels = 1:3)
split(iris, a)
lapply(split(iris, a), dim)
On Mon, Oct 13, 2008 at 2:06 PM, Jay <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'll use part of the iris dataset for an example of what I want to
> do.
>
> > data(iris)
> > iris<-iris[1:
3 matches
Mail list logo