While both SAS and R are powerful systems for statistical analysis, they can be frustrating to new users or those learning statistics for the first time. RThe mosaic package is designed to help simplify the interface for such new users, while allowing …
Example 9.9: Simplifying R using the mosaic package (part 1)
While both SAS and R are powerful systems for statistical analysis, they can be frustrating to new users or those learning statistics for the first time. RThe mosaic package is designed to help simplify the interface for such new users, while allowing …
Counting the number of missing and non-missing values for each variable in a data set.
/* create sample data */
data one;
input a $ b $ c $ d e;
cards;
a . a 1 3
. b . 2 4
a a a . 5
. . b 3 5
a a a . 6
a a a . 7
a a a 2 8
;
run;
/* create a format to group missing and non-missing */
proc format;
value $missfmt ‘ ‘=’m…
Counting the number of missing and non-missing values for each variable in a data set.
/* create sample data */
data one;
input a $ b $ c $ d e;
cards;
a . a 1 3
. b . 2 4
a a a . 5
. . b 3 5
a a a . 6
a a a . 7
a a a 2 8
;
run;
/* create a format to group missing and non-missing */
proc format;
value $missfmt ‘ ‘=’m…
Counting the number of missing and non-missing values for each variable in a data set.
/* create sample data */
data one;
input a $ b $ c $ d e;
cards;
a . a 1 3
. b . 2 4
a a a . 5
. . b 3 5
a a a . 6
a a a . 7
a a a 2 8
;
run;
/* create a format to group missing and non-missing */
proc format;
value $missfmt ‘ ‘=’m…
Efficiently Drop/Keep SAS Data Set Columns
What is the most efficient way to drop/keep columns (variables) in sas tables (data sets)?For the most part, we would correctly say “using a keep= option on the data set as it is being read into the current step.” A quick example to illustrate: data s…