How would you do to translate the following R-command in SAS
sequence <- seq(from=a, to=b, length.out=n)
In other words, how would you do in SAS to select n equally spaced values between a and b?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could easily replicate this in SAS with a DO loop, having previously stored the required values in macro variables. I’m not sure in what context you are using this, however the code below will create a dataset with the required number of rows and equally spaced values. Hopefully this will point you in the right direction.