array

  1. I

    Complex Logic Statement That Searches Multiple Variables

    Hi all, I'm trying to write code for something I will use describing candy. Basically my outcome is "sugar rush". I have a variable that notes if people have had sugar rushes by a certain type of sugar (e.g. - candy, chocolate, soda, etc). I will call this variable "USUGAR". Related...
  2. M

    select array data in which column n's values rise consecutively

    I want to select only the data from an array that is sequential by column n. For example: n <- c(1, 2, 4, 6, 7, 8, 9, 11) x <- c(10, 20, 30, 40, 50, 60, 80, 90) y <- c(60, 20, 40, 90, 10, 30, 50, 40) a <- cbind(n,x,y) a n x y [1,] 1 10 60 [2,] 2 20 20 [3,] 4 30 40...
  3. A

    Array problem

    Hello all! :wave: Thanks for any help you might have. I've got a dataset with repeated measures for each medical ICD-9 code, and I need to make it such that the data is one row per person. For example (this isn't actually my data): What I have now: Kelly 745.5 Kelly 747.0...