In the output, values of address and course will disappear for data set non_training_department. empid, name, salary, address and course, and another is non_training_department, which has three variables, i.e. One is training_department, which has five variables, i.e. If all data sets do not have an equal number of variables, then data sets still get concatenated, but values of extra variables disappear in small data sets. Let's see the different cases when data sets variables have variations. In such type of different cases, the total number of observations in the concatenated data set is always equal to the sum of the observations in each data set. There are some cases when data sets have variations in the variables. Now, execute the above code in SAS studio:Īs we can see in the output, both data sets have concatenated in a single table. Ideally, all the combining data sets should have the same number of variables, but if they have the different number of variables, then all the variables will appear in the result, with the missing value for the small data set. All the observations in concatenated data set follow a proper storing sequence like this, on the first place, all the observations of the first data set, on the second place, all the observations of the second data set, and so on. Concatenated data set stores sum of all the observations of original data sets. The SET statement is used to concatenate different data sets into a single data set. To do so, SAS facilitates you to concatenate different data sets into a single data set. Suppose, you have many observations in different data sets, and you need to collect all the observations in a single data set, then what will you do. Now, in this topic, we are going to learn how to concatenate multiple data sets into a single data-set in the SAS programming language. In the previous topic, we have learned to write SAS data-sets in different file formats. Next → ← prev Concatenate Multiple Data sets
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |