Skip to content
Prev 387194 / 398502 Next

ddply/tapply and set function

df <- data.frame(X1 = c(1,1,1,2,2), X2 = c(1,5,7,3,8))
X1 X2
1  1  1
2  1  5
3  1  7
4  2  3
5  2  8
## v is a list, and I would work directly with this rather than converting
to a data.frame. But if you insist:
vector c(1,5,7)
[[1]]
[1] 1 5 7
[1] 1 5 7


Cheers,
Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Feb 17, 2021 at 6:50 AM A. Mani <a.mani.cms at gmail.com> wrote: