If I dont know the exact length of an array after a transpose, is there a way to output it? or to use it, without manually looking through the output data? For example, if I transpose on number of pills dispensed, but that number is variable for each 'id' and then I want to specify that array in a regression, is there a way to do it without finding the value via manual visual inspection?
PROC PHREG DATA=...;
ARRAY start{*} start1-start????;
DO I=1 TO ?????;
IF start{I}<t2event THEN var=1;
END;
MODEL .........
As a corollary if I know that its less than say, 100, and I specify 100, would there be any consequence? Thanks!
Using sizeof() function to Find Array Length in C++ Hence, if we simply divide the size of the array by the size acquired by each element of the same, we can get the total number of elements present in the array.
Basically, the length of an array is the total number of the elements which is contained by all the dimensions of that array. Property Value: This property returns the total number of elements in all the dimensions of the Array. It can also return zero if there are no elements in the array.
To get the size of a Java array, you use the length property. To get the size of an ArrayList, you use the size() method. Know the difference between the Java array length and the String's length() method.
The DIM() function returns the dimensions of an array. You can use the : suffix to make a variable list of names that start with the same letters.
ARRAY start{*} start: ;
DO I=1 TO dim(start);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With