Hi Bert and All: good morning
I promise this would be the last time to write about this topic.
I come up with this R function (please see below), for sure with your help.
It works for all sample sizes. I also provided three different simple
examples.
with many thanks
abou
##
In case anyone is still interested in my query, note that if there are
n total items to be split into g groups as evenly as possible, if we
define this as at most two different size groups whose size differs by
1, then:
if n = k*g + r, where 0 <= r < g,
then n = k*(g - r) + (k + 1)*r .
i.e. g-r g
R-help On Behalf Of AbouEl-Makarim
Aboueissa
Sent: Saturday, September 4, 2021 5:13 PM
To: Thomas Subia
Cc: R mailing list
Subject: Re: [R] Splitting a data column randomly into 3 groups
Dear Thomas:
Thank you very much for your input in this matter.
The core part of this R code(s) (please s
I have a more general problem for you.
Given n items and 2 <=g < wrote:
>
> Dear Thomas:
>
>
> Thank you very much for your input in this matter.
>
>
> The core part of this R code(s) (please see below) was written by *Richard
> O'Keefe*. I had three examples with different sample sizes.
>
>
>
> *
Dear Thomas:
Thank you very much for your input in this matter.
The core part of this R code(s) (please see below) was written by *Richard
O'Keefe*. I had three examples with different sample sizes.
*First sample of size n1 = 204* divided randomly into three groups of sizes
68. *No problems
Hi Richard:
Thank you very much for your help in this matter.
with thanks
abou
__
*AbouEl-Makarim Aboueissa, PhD*
*Professor, Statistics and Data Science*
*Graduate Coordinator*
*Department of Mathematics and Statistics*
*University of Southern Maine*
On Fri, Sep 3, 202
ing this regularly, use of some packages is highly valuable.
>
>
>
> Good Luck.
>
>
>
>
>
>
>
>
>
>
>
> From: AbouEl-Makarim Aboueissa
> Sent: Thursday, September 2, 2021 9:51 PM
> To: Avi Gross
> Cc: R mailing list
> Subject: Re: [R] Split
Your question is ambiguous.
One reading is
n <- length(table$Data)
m <- n %/% 3
s <- sample(1:n, n)
X <- table$Data[s[1:m]]
Y <- table$Data[s[(m+1):(2*m)]]
Z <- table$Data[s[(m*2+1):(3*m)]]
On Fri, 3 Sept 2021 at 13:31, AbouEl-Makarim Aboueissa
wrote:
>
> Dear All:
>
> How to split
r 2, 2021 9:51 PM
To: Avi Gross
Cc: R mailing list
Subject: Re: [R] Splitting a data column randomly into 3 groups
Sorry, please forget about it. I believe that I am very serious when I posted
my question.
with thanks
abou
__
AbouEl-Makarim Aboueissa, PhD
Profes
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
wrote:
>
> Dear All:
t; -Original Message-
> From: R-help On Behalf Of AbouEl-Makarim
> Aboueissa
> Sent: Thursday, September 2, 2021 9:30 PM
> To: R mailing list
> Subject: [R] Splitting a data column randomly into 3 groups
>
> Dear All:
>
> How to split a column data
know how to copy just the ones that were not selected, we could easily ...
-Original Message-
From: R-help On Behalf Of AbouEl-Makarim
Aboueissa
Sent: Thursday, September 2, 2021 9:30 PM
To: R mailing list
Subject: [R] Splitting a data column randomly into 3 groups
Dear All:
How to
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
13 matches
Mail list logo