Displaying 1 result from an estimated 1 matches for "tp4450495p4450656".
2012 Mar 06
4
Add number series to data frame
Hi,
Is there a simple way of doing the following in R?
a <- data.frame(name = c(rep("A", 3), rep("B", 5), rep("C", 10)))
> a
name
1 A
2 A
3 A
4 B
5 B
6 B
7 B
8 B
9 C
10 C
11 C
12 C
13 C
14 C
15 C
16 C
17 C
18 C
Do some fancy R code here:
> a
name val
1 A 1
2 A 2
3 A 3
4