Hi,
Use ?rep()
df1 <- read.table(text="Site Scientific.name value size
'Flat Cay' 'S. iserti' 3 2.5
'Flat Cay' 'S. iserti' 2 8
'Flat Cay' 'S. iserti' 1 25
'Flat Cay' 'S. taeniopter
On Behalf Of Andrew Anglemyer
> Sent: Wednesday, 28 July 2010 9:22 AM
> To: r-help@r-project.org
> Subject: [R] repeating rows in R
>
> I'm somewhat a new user and have been trying to figure out how to repeat
> rows a certain number of time based on a variable. Currently, the
34
3.3 34
>
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Andrew Anglemyer
Sent: Wednesday, 28 July 2010 9:22 AM
To: r-help@r-project.org
Subject: [R] repeating rows in R
I'm somewhat a new user and have been t
I'm somewhat a new user and have been trying to figure out how to repeat
rows a certain number of time based on a variable. Currently, the number of
rows is not reflective of the number of observations. To get the number of
observations (n=22 in this case), I have to multiply by the variable
NoRe
4 matches
Mail list logo