arrays

  1. S

    reshaping data

    I am trying to reshape data in SAS in a very specific way. The data looks like: ID Q1 Q2 491 0 0 491 0 1 1040 0 1 1040 1 0 1040 2 1 And, I want to transform the data to the following shape: ID Q1A Q1B Q2A Q2B 491 0 0 0 1 1040 0 1 1 0 1040 0 2 1 1 1040 1 2 0 1 So, a pair of variables...
  2. W

    (Easy) question about 'apply' on arrays

    Hello everyone! So... I am trying to learn how to correctly use the 'apply' function while learning something about the Wishart distribution. R has a function called 'rWishart' where you can sample random positive-definite matrices and store them in lists. From the official documentation I...
  3. V

    Entering data into a multi-way array?

    Hello: I am a novice R user, but I have been working my way through the manuals / tutorials, ... I have R / Deducer up and running, and know the basics. I want to analyze a microarray (gene expression) dataset. I need to input the data into R as a multidimensional (multi-way) array...
  4. D

    I need solution for this problem ASAP. Probability problem with two arrays of holes.

    Given two arrays of holes, Each hole can be filled in by a white ball or a black ball. 1. Each array has n holes, and can be filled in by r black balls and (n-r) white balls. 2. Both arrays are filled independently. 3. Both arrays have been indexed by the same set of integers 1,2,3,...n. We say...