Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.
how to select only those samples that meet two or more criteria
Created:
Sep 22, 2022 11:56 AM
| Last Modified: Jun 9, 2023 8:58 AM(3166 views)
i want to create a new column using Day1_Orig values wherein there are both Day1_Orig and Day1_Repeat values for the same SUBJID. So for instance, lines 113 and 114 have same SUBJID, so the new column would record the value of the Day1_Orig value in line 113 (834), but as there is no corresponding Day1_Repeat value for line 107 (641), this Day1_Orig value would not be included in the new column.
Names Default To Here(1);
dt = New Table("Untitled 3",
Add Rows(6),
New Column("S", Numeric, "Continuous", Format("Best", 12), Set Values([89, 89, 96, 96, 96, 96])),
New Column("O", Numeric, "Continuous", Format("Best", 12), Set Values([641, ., 834, ., ., .])),
New Column("R", Numeric, "Continuous", Format("Best", 12), Set Values([., ., ., 230, ., .]))
);
dt << New Column("Test", Numeric, Continuous, Formula(
If(Col Number(:O, :S) != 0 & Col Number(:R, :S), /*check if both :o and :R have value for this :S*/
If(Col Cumulative Sum(!IsMissing(:O), :S) == 1, /* Check if row is first found value for :o for this :S*/
:O
)
);
));