Message-ID: <1384443390.12620.YahooMailNeo@web142601.mail.bf1.yahoo.com>
Date: 2013-11-14T15:36:30Z
From: arun
Subject: Transform aggregated data to individual data
In-Reply-To: <001b01cee124$3f227c60$bd677520$@peron@univ-pau.fr>
Hi,
Try:
?D1 <- D[rep(row.names(D),D[,3]),-3] ##assuming rownames(D) are from 1:nrow(D)
?row.names(D1) <- 1:nrow(D1)
A.K.
On Thursday, November 14, 2013 5:32 AM, peron <olivier.peron at univ-pau.fr> wrote:
Hello
I have data in following form : 100 ind describe by two variables x and y.
D<-data .frame( x=rnorm(3), y=rnorm(3), size=c(50,10,40))
I want data for individual, i.e, 100 observations for my 100 ind.
Thank for your help
Olivier Peron
??? [[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.