On 9/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Dear All:
> I need to have some data frame objects.
> First aa object:
>    pH  Formulation  time  Subject
> [1]1.2  F           0       1
> [2]7.4  S           1       2
> [3]    MF           2       3
> [4]                 3       4
> [5]                 n        i
> Then, I need to produce 2*3(pH*formulation) different
> tables.  This table includes column of (pH,
> Formulation, time  S1  S2  S3 …..Si) and S1= subject
> 1, S2=subject 2 and so on.  For example: bb1 table
>    pH  Formulation  time  S1  S2  S3….Si
> [1]1.2  F           0
> [2]                 1
> [3]                 2
> [4]                 3
> [5]                 n
>
> For example: bb2 table
>    pH  Formulation  time  S1  S2  S3….Si
> [1]1.2  S           0
> [2]                 1
> [3]                 2
> [4]                 3
> [5]                 n
>
>
> Moreover, the values of pH and Formulation column are
> the combination questions.  The values of pH and
> Formulation column should be the combinations such as
> (1.2, F), (1.2, S), (1.2, MF), (7.4, F), (7.4, S),
> (7.4, MF)
> I am a beginner level in R and I have no idea how to
> do this. Could any one please help me.  Thanks a
> lot!!!
>
> Best regrards
> Hsin Ya Lee
>

I don't understand exactly what you want but perhaps start with this:

expand.grid(pH = c(1.2, 7.4), Formulation = c("F", "S", "MF"))

Hope this helps,

Stephen

-- 
Rochester, Minn. USA

______________________________________________
R-help@stat.math.ethz.ch mailing list
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.

Reply via email to