in Education by
I have bit a problem. I need insert to Array only (example) first array, best field by field. How Can I do it? I will be grateful if also you point how insert column by column (I will be able to load chosen columns in the future). data have; infile DATALINES dsd missover; input varr1 varr2 varr3; CARDS; 1, 2, 3 2, 3, 4 5, 4 4, 3 9, 4, 1 6, ;run; data want; set have; array L[3] _temporary_ ; if _n_ = 1 then do; do i = 1 to 3; %LET j = i; L[i] = varr&i; /*in this place I have problem*/ put L[i]; end; end; run; JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You don't need macro, and not sure why you need temporary array L. The array statement can be used to organize variables so they can be accessed in an array manner. Loop over the variable array in order to copy the values into the temporary array. The elements of a temporary array are not available for output, and not part of normal implicit program data vector (PDV) behaviors that would reset variables to missing. data want; set have; array V varr1-varr3; array L[3] _temporary_; * save first rows values in temporary array for use in other rows; if _n_ = 1 then do index = 1 to dim(V); L[index] = V[index]; end; * … for example … ; array delta_from_1st [3]; * array statement implicitly creates three new variables that become part of PDV and get output; do index = 1 to dim(V); delta_from_1st[index] = V[index] - L[index]; end; run;

Related questions

0 votes
    What is indexOf method in Java, I can't seem to find it anywhere. Also how do I use it? Select the correct answer from above options...
asked Jan 21, 2022 in Education by JackTerrance
0 votes
    I would like to find out safe ways of implementing three dimensional arrays of integers in C++, using ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 31, 2022 in Education by JackTerrance
0 votes
    I would like to find out safe ways of implementing three dimensional arrays of integers in C++, using ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 30, 2022 in Education by JackTerrance
0 votes
    I would like to find out safe ways of implementing three dimensional arrays of integers in C++, using ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 29, 2022 in Education by JackTerrance
0 votes
    I have a map stored as a multidimensional array ($map[row][col]) and I'd wish to create a path from ... path inside these values? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I have worked all the tutorials and searched for "load csv tensorflow" but just can't get the logic of it all. ... and test the net. Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    In the chapter seven of this book "TensorFlow Machine Learning Cookbook" the author in pre-processing data ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    If the size of the array used to implement a circular queue is MAX_SIZE. How rear moves to traverse inorder ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    If the size of the array used to implement a circular queue is MAX_SIZE. How rear moves to traverse ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    As you can see from the code below i m looping an array and if condition met i want to get the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    State some features of SAS in Azure?...
asked Dec 29, 2020 in Technology by JackTerrance
0 votes
    What do you mean by SAS in Azure?...
asked Dec 29, 2020 in Technology by JackTerrance
0 votes
    Write a program to generate first 20 terms of Fibonacci series and store them in single dimension array. Display ... from the array Select the correct answer from above options...
asked Dec 10, 2021 in Education by JackTerrance
0 votes
    I have a dataset that only contains y-values in one column. I want to insert a column of x- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
...