SAS Transpose Process

Source: Internet
Author: User

Transpose basic syntax

Note: If Output-data-set does not exist, PROC transpose creates it by using the
DATA n naming convention. ??
Note: If you omit the VAR statement, the transpose procedure transposes all of
The numeric variables in the input data set is listed in another statement. ??
Note: You must list character variables in a VAR statement if you want to transpose
them. ??

What is the default variable name in the dataset after being transpose?

_name_: Is the default NAME of the variable so PROC transpose creates to ID Entify the source of the values in each observation in the output data set

This variable was a character variable whose values are the names of the variables so is transpose D from the input data set

The default label is:NAME of FORMER VARIABLE

Col1-coln: The rest of the columns are named by default

How do I change the default variable name?

The name= option specifies a NAME for the _name_ variable

The prefix= option specifies a PREFIX to use in constructing names for transposed variables in the output data se T

proc transpose Data=sasuser.ctargetsout=work. Ctarget2 name = Month prefix = Ctarget;run;

Changes before and after effects are as follows

By statement grouping transpose datasets

For each by group, the PROC transpose creates one observation for each variable the IT transposes. The by variable itself are not transposed

I understand that the values of the first column of the transferred dataset are all previous variable names, and if by, the by variable does not transpose, but instead appears as a grouping variable in the first column (considering the case of a single by) The second column is the _name_ column

For each by group, the previous variables are listed again

var statement

The variables in Var are variables that need to be transpose, which will only be transpose, and the other don ' t care!

SAS Transpose Process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.