Re: [R] help

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Wed 01 Jun 2005 - 16:50:03 EST

It

is

really

hard

to

read

your

message.

Anyway,

I

guess

you

are

looking

for

?reshape

Uwe Ligges

jose silva wrote:

> Dear all:
>
>
>
>
>
>
>
>
>
> I have this:
>
>
>
>
> A1 B1 C1 D1 E1
>
>
>
>
> A2 B2 C2 D2 E2
>
>
>
>
> A3 B3 C3 D3 E3
>
>
>
>
>
>
>
>
>
> And I want this
>
>
>
>
> A1 E1
>
>
>
>
> B1 E1
>
>
>
>
> C1 E1
>
>
>
>
> D1 E1
>
>
>
>
> A2 E2
>
>
>
>
> B2 E2
>
>
>
>
> C2 E2
>
>
>
>
> D2 E2
>
>
>
>
> A3 E3
>
>
>
>
> B3 E3
>
>
>
>
> C3 E3
>
>
>
>
> D3 E3
>
>
>
>
>
>
>
>
>
> Example:
>
>
>
>
>
>
>
>
>
> m<- matrix(1:15,nrow=3,byrow=T)
>
>
>
>
> m
>
>
>
>
> v<- unlist(list(t(m[,1:4])))
>
>
>
>
> u<- rep(c(5,10,15),c(4,4,4))
>
>
>
>
> data.frame(v,u)
>
>
>
>
>
>
>
>
>
> This is the result I want but I would like to learn a simpler way to do it. Any clue?
>
>
>
>
>
>
>
>
>
> Thanks
>
>
>
>
>
>
>
>
>
> j. silva
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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



R-help@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 Received on Wed Jun 01 16:54:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:20 EST