Skip to content
Back to formatted view

Raw Message

Message-ID: <CA+8X3fUn-XTqM3dUgdDu7+vnBTZPKw=-kh7W=cQmWFDz6EX+mQ@mail.gmail.com>
Date: 2021-09-03T01:46:04Z
From: Jim Lemon
Subject: Splitting a data column randomly into 3 groups
In-Reply-To: <CAE9stmd5Rn4oXK=gF0dOKz_ckwOcLaKfUcc7ZoRBiUooBTXkOA@mail.gmail.com>

Hi Abou,
One way is to shuffle the original data frame using sample(). and
split up the result into three equal parts.
I was going to provide example code, but Avi's response popped up and
I kind of agree with him.

Jim

On Fri, Sep 3, 2021 at 11:31 AM AbouEl-Makarim Aboueissa
<abouelmakarim1962 at gmail.com> wrote:
>
> Dear All:
>
> How to split a column data *randomly* into three groups. Please see the
> attached data. I need to split column #2 titled "Data"
>
> with many thanks
> abou
> ______________________
>
>
> *AbouEl-Makarim Aboueissa, PhD*
>
> *Professor, Statistics and Data Science*
> *Graduate Coordinator*
>
> *Department of Mathematics and Statistics*
> *University of Southern Maine*
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.