Please use this model to send your data and code

> mydata <- data.frame(x, y, fx, fy)
> head(mydata)  ## just the first 6 rows are displayed on screen
   x y fx fy
1  4 3 37 40
2  4 3 21 20
3  0 0 65 50
4 12 0 91 49
5  1 5 22 20
6  2 3  6 10
> dump("mydata", "")
mydata <-
structure(list(x = c(4, 4, 0, 12, 1, 2, 0, 2, 6, 1, 0, 20, 6,
5, 20, 0, 0, 0, 4, 1, 0, 16, 0, 9, 7, 11, 0, 2, 3, 0, 10, 2,
1, 0, 3, 6, 4, 0, 20, 11, 1, 8, 0, 6, 15, 0, 2, 5, 2, 6, 24,
1, 11, 6, 9), y = c(3, 3, 0, 0, 5, 3, 0, 5, 4, 2, 0, 20, 6, 1,
18, 0, 0, 3, 3, 1, 0, 4, 0, 13, 7, 12, 0, 2, 2, 0, 2, 4, 0, 4,
2, 5, 0, 0, 23, 8, 0, 14, 0, 9, 20, 0, 2, 0, 2, 2, 14, 4, 1,
4, 7), fx = c(37, 21, 65, 91, 22, 6, 31, 41, 27, 5, 77, 33, 90,
26, 35, 35, 34, 30, 13, 24, 107, 122, 33, 18, 34, 23, 27, 8,
81, 6, 9, 38, 44, 18, 30, 37, 96, 8, 53, 56, 10, 71, 26, 36,
24, 73, 27, 46, 85, 46, 117, 17, 45, 51, 67), fy = c(40, 20,
50, 49, 20, 10, 36, 48, 39, 7, 72, 38, 71, 2, 69, 7, 7, 32, 32,
32, 34, 17, 26, 25, 140, 132, 36, 15, 35, 23, 19, 35, 35, 38,
30, 38, 103, 13, 61, 48, 17, 74, 33, 44, 28, 94, 24, 52, 70,
47, 118, 21, 52, 59, 84)), .Names = c("x", "y", "fx", "fy"), row.names =
c(NA,
-55L), class = "data.frame")
>

Now the reader can pick up the "mydata <- " ....
lines and paste them into the R session and reproduce what
you want us to see.

On Thu, Oct 25, 2012 at 9:53 AM, Richard M. Heiberger <rmh@temple.edu>wrote:

> With effort I re-inserted the line feeds in your code that the
> pdf file deleted.
> There is an error in your code
>
> Error in 0:(x[t == i][l]) (from #9) : NA/NaN argument
>
> >
> > x[t == i]
> [1] 8 2 9
> > l
> [1] 4
> >
>
> On Thu, Oct 25, 2012 at 7:45 AM, Loukia Spineli <spineliloukia26@gmail.com
> > wrote:
>
>> x and y are the frequencies of missing participants in the intervention
>> and the control treatment respectively! vector t contains the code of the
>> interventions (we have 11 interventions). I re-attach the PDF with some
>> small modifications. I am trying to create a list, where each list
>> element is a vector of different length arrays that contain 2by2 matrices.
>> To be more specific there are 11 treatments that are compared with placebo
>> (we have 11 comparisons) and each comparison is studied by a different
>> number of trials and each trial has a different number of missing
>> participants in both arms. The length of the list is equal to the number of
>> comparisons. In each comparison the number of arrays is equal to the number
>> of trials that study this comparison. For instance 4 trials compare PAR
>> with placebo. So, for this comparison we have 4 arrays and each array has a
>> length equal to the producy of the number of participants in each arm.
>> These arrays contain 2x2 matrices.
>>
>> I have attached a document with the data and the code. I cannot create
>> the list results the way I have described above. It creates only the
>>  matrices for the first array (that has length equal to 135) of the first
>> comparison leaving the rest 10 comparisons "NULL".
>>
>> On Wed, Oct 24, 2012 at 5:17 PM, Richard M. Heiberger <rmh@temple.edu>wrote:
>>
>>> I am looking at your pdf file.
>>>
>>> it doesn't match your description.
>>>
>>> There are no missing values in the vectors
>>> x, y, t.
>>> Each vector has length 55 which is not a multiple of 4,
>>> so we don't know where the 2x2 matrices come from.
>>>
>>> The code doesn't run.  There are are too many "}".
>>> PDF files are formatted and are not ascii.
>>>
>>> Please send your code in ascii text in the body of the email.
>>> Please pick it up from your email and paste it into
>>> a fresh R session to be sure that it works.
>>>
>>> Perhaps consrtruct manually an example of what you want the answer to
>>> look like.
>>>
>>> Rich
>>>
>>>
>>>
>>> On Wed, Oct 24, 2012 at 3:51 AM, Loukia Spineli <
>>> spineliloukia26@gmail.com> wrote:
>>>
>>>> Dear all,
>>>>
>>>> I am trying to create a list, where each list element is a vector of
>>>> different length arrays that contain 2by2 matrices. To be more specific
>>>> there are 11 treatments that are compared with placebo (we have 11
>>>> comparisons) and each comparison is studied by a different number of
>>>> trials
>>>> and each trial has a different number of missing participants in both
>>>> arms.
>>>> The length of the list is equal to the number of comparisons. In each
>>>> comparison the number of arrays is equal to the number of trials that
>>>> study
>>>> this comparison. For instance 4 trials compare PAR with placebo. So, for
>>>> this comparison we have 4 arrays and each array has a length equal to
>>>> the
>>>> producy of the number of participants in each arm. These arrays contain
>>>> 2x2
>>>> matrices.
>>>>
>>>> I have attached a document with the data and the code. I cannot create
>>>> the
>>>> list results the way I have described above. It creates only the
>>>>  matrices
>>>> for the first array (that has length equal to 135) of the first
>>>> comparison
>>>> leaving the rest 10 comparisons "NULL".
>>>> Any suggestion would be  really helpful
>>>>
>>>> Thank you in advance,
>>>> Loukia
>>>>
>>>> ______________________________________________
>>>> R-help@r-project.org 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.
>>>>
>>>>
>>>
>>
>

	[[alternative HTML version deleted]]


