<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is the most efficient way to fill in blank cells w/ NA? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847943#M335227</link>
    <description>Thanks for the reply and the explanation. &lt;BR /&gt;&lt;BR /&gt;But this is a unique situation where the value can take 1 of 2 possible values for a blank cell, either "NA" for n or median, or "NA (NA)" for mean_std. So this is not quite i was looking for, although this is a useful trick</description>
    <pubDate>Mon, 05 Dec 2022 20:42:28 GMT</pubDate>
    <dc:creator>Hello_there</dc:creator>
    <dc:date>2022-12-05T20:42:28Z</dc:date>
    <item>
      <title>What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847902#M335212</link>
      <description>&lt;P&gt;Hi, I'm working with a table in which i have many visits, and I'm trying to fill in NA (NA) (for mean (sd)) and NA (for median and n) for cell values that are blank. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the most efficient way to do this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile datalines dsd dlm=",";
	input visit $ stat $ trt1 $ trt2 $ trt3 $;
datalines;
001, mean_std, 5 (3), 4 (2), 5 (3)
001, median, 3, 3, 3
001, n, 2, 4, 5
002, mean_std, , , 
002, median, , ,
002, n, , , 
003, mean_std, 2 (4), 4 (3), 6, (1)
003, median, 1, 1, 1
003, n, 2, 2, 9
; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;desired output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hello_there_0-1670271416215.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78053i52C0ECAD76108FD8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hello_there_0-1670271416215.png" alt="Hello_there_0-1670271416215.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847902#M335212</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T20:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847911#M335214</link>
      <description>&lt;P&gt;More context is needed. Why are you doing this? Is it because you want NA in a data set so that you can perform additional programming tasks on it (what programming tasks), or you want NA in a report, or something else?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Is this really the raw data you are working from, or did you run PROC MEANS on some actual data and want this re-arranged as you show?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Context, please!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847911#M335214</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-05T20:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847918#M335217</link>
      <description>Hi PaigeMiller,&lt;BR /&gt;I ran proc means and i would like it rearranged as shown.&lt;BR /&gt;&lt;BR /&gt;After i had transposed it, there were lots of blank cells that need to be filled in. &lt;BR /&gt;&lt;BR /&gt;For future reference i guess it would be best to specify that this is for a table/report instead of needed in a data set.&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:24:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847918#M335217</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T20:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847930#M335222</link>
      <description>&lt;P&gt;Please show us the output from PROC MEANS. Or is that what you are showing us already in your first message?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847930#M335222</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-05T20:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847936#M335224</link>
      <description>&lt;P&gt;This is my personal computer, so I don't have access to the actual output. I make these mock examples that are representative of the nature of my problem. I make up the data and hardcode it in a data step with the datalines statement.&lt;BR /&gt;&lt;BR /&gt;The issue I'm having is coming up with the most efficient way to fill in the blank cells w/ "NA (NA) "for when stat = "mean_std" and trt1 or trt2 or tr3 is blank&lt;BR /&gt;and also fill in "NA" for when stat=median or stat=n and either trt1 or trt2 or trt3 is blank. &lt;BR /&gt;&lt;BR /&gt;I wish i could give you more context, but this is more a data manipulation problem than anything else. Perhaps there's a keyword in PROC Means i don't know that fills 0 for all combinations of treatment and visit, but it appears that proc only counts non missing values in the VAR statement.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847936#M335224</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T20:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847942#M335226</link>
      <description>&lt;P&gt;It's just a data manipulation exercise. I got it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So important data manipulation concept: just because you want NAs in a report doesn't mean you have to have NAs in a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's so important, I will say it again:&amp;nbsp;just because you want NAs in a report doesn't mean you have to have NAs in a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create this table in any of a number of ways (PROC TABULATE, PROC REPORT, maybe even PROC PRINT and the &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_self"&gt;%TABLEN macro&lt;/A&gt;), and by setting the proper option, your missings will appear as NA. This can also be done with custom formats. So ... there's no need to create a DATA set with NAs in place of missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing='NA';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847942#M335226</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-05T20:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847943#M335227</link>
      <description>Thanks for the reply and the explanation. &lt;BR /&gt;&lt;BR /&gt;But this is a unique situation where the value can take 1 of 2 possible values for a blank cell, either "NA" for n or median, or "NA (NA)" for mean_std. So this is not quite i was looking for, although this is a useful trick</description>
      <pubDate>Mon, 05 Dec 2022 20:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847943#M335227</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T20:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847946#M335229</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It's just a data manipulation exercise. I got it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So important data manipulation concept: just because you want NAs in a report doesn't mean you have to have NAs in a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's so important, I will say it again:&amp;nbsp;just because you want NAs in a report doesn't mean you have to have NAs in a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create this table in any of a number of ways (PROC TABULATE, PROC REPORT, maybe even PROC PRINT and the &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_self"&gt;%TABLEN macro&lt;/A&gt;), and by setting the proper option, your missings will appear as NA. This can also be done with custom formats. So ... there's no need to create a DATA set with NAs in place of missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing='NA';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That cannot work.&amp;nbsp; The MISSING option can only accept a single character.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847946#M335229</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-05T20:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847947#M335230</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It's just a data manipulation exercise. I got it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So important data manipulation concept: just because you want NAs in a report doesn't mean you have to have NAs in a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's so important, I will say it again:&amp;nbsp;just because you want NAs in a report doesn't mean you have to have NAs in a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create this table in any of a number of ways (PROC TABULATE, PROC REPORT, maybe even PROC PRINT and the &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_self"&gt;%TABLEN macro&lt;/A&gt;), and by setting the proper option, your missings will appear as NA. This can also be done with custom formats. So ... there's no need to create a DATA set with NAs in place of missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing='NA';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That cannot work.&amp;nbsp; The MISSING option can only accept a single character.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Okay, I stand corrected, but custom formats would work fine here.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847947#M335230</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-05T20:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847950#M335233</link>
      <description>&lt;P&gt;Just use an ARRAY.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile datalines dsd ;
	input visit $ stat $ trt1 $ trt2 $ trt3 $;
datalines;
001, mean_std, 5 (3), 4 (2), 5 (3)
001, median, 3, 3, 3
001, n, 2, 4, 5
002, mean_std, , , 
002, median, , ,
002, n, , , 
003, mean_std, 2 (4), 4 (3), 6, (1)
003, median, 1, 1, 1
003, n, 2, 2, 9
; 

data want;
  set have ;
  array trt [3] ;
  do index=1 to dim(trt);
    if missing(trt[index]) then do;
      if stat in ('median' 'n') then trt[index]='NA';
      if stat in ('mean_std') then trt[index]='NA (NA)';
    end;
  end;
run;

proc print;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs    visit    stat        trt1       trt2       trt3       index

 1      001     mean_std    5 (3)      4 (2)      5 (3)        4
 2      001     median      3          3          3            4
 3      001     n           2          4          5            4
 4      002     mean_std    NA (NA)    NA (NA)    NA (NA)      4
 5      002     median      NA         NA         NA           4
 6      002     n           NA         NA         NA           4
 7      003     mean_std    2 (4)      4 (3)      6            4
 8      003     median      1          1          1            4
 9      003     n           2          2          9            4
&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847950#M335233</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-05T20:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847953#M335234</link>
      <description>Thanks, Tom! This is perfect.</description>
      <pubDate>Mon, 05 Dec 2022 20:52:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847953#M335234</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T20:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847955#M335235</link>
      <description>&lt;P&gt;You should have handled the missing values before you transposed it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847955#M335235</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-05T20:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847956#M335236</link>
      <description>&lt;P&gt;Proc tabulate table option MISSTEXT does work though. The Sashelp.class data set has no females age 16 so when you run&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   var height;
   table age * height*(max min),
         sex
         /misstext='NA'
   ;
run;&lt;/PRE&gt;
&lt;P&gt;The result is&lt;/P&gt;
&lt;DIV class="branch"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="branch"&gt;&lt;A name="IDX1" target="_blank"&gt;&lt;/A&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Tabulate: Table 1" cellspacing="0" cellpadding="3"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c m header" colspan="3" rowspan="2" scope="colgroup"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c m header" colspan="2" scope="colgroup"&gt;Sex&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c m header" scope="col"&gt;F&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;M&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Age&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD rowspan="2" class="r b data"&gt;51.30&lt;/TD&gt;
&lt;TD rowspan="2" class="r b data"&gt;57.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;11&lt;/TH&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;Height&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Max&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Min&lt;/TH&gt;
&lt;TD class="r b data"&gt;51.30&lt;/TD&gt;
&lt;TD class="r b data"&gt;57.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;12&lt;/TH&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;Height&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Max&lt;/TH&gt;
&lt;TD class="r b data"&gt;59.80&lt;/TD&gt;
&lt;TD class="r b data"&gt;64.80&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Min&lt;/TH&gt;
&lt;TD class="r b data"&gt;56.30&lt;/TD&gt;
&lt;TD class="r b data"&gt;57.30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;13&lt;/TH&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;Height&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Max&lt;/TH&gt;
&lt;TD class="r b data"&gt;65.30&lt;/TD&gt;
&lt;TD class="r b data"&gt;62.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Min&lt;/TH&gt;
&lt;TD class="r b data"&gt;56.50&lt;/TD&gt;
&lt;TD class="r b data"&gt;62.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;14&lt;/TH&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;Height&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Max&lt;/TH&gt;
&lt;TD class="r b data"&gt;64.30&lt;/TD&gt;
&lt;TD class="r b data"&gt;69.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Min&lt;/TH&gt;
&lt;TD class="r b data"&gt;62.80&lt;/TD&gt;
&lt;TD class="r b data"&gt;63.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;15&lt;/TH&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;Height&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Max&lt;/TH&gt;
&lt;TD class="r b data"&gt;66.50&lt;/TD&gt;
&lt;TD class="r b data"&gt;67.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Min&lt;/TH&gt;
&lt;TD class="r b data"&gt;62.50&lt;/TD&gt;
&lt;TD class="r b data"&gt;66.50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;16&lt;/TH&gt;
&lt;TH class="l m rowheader" rowspan="2" scope="rowgroup"&gt;Height&lt;/TH&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Max&lt;/TH&gt;
&lt;TD class="r b data"&gt;NA&lt;/TD&gt;
&lt;TD class="r b data"&gt;72.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Min&lt;/TH&gt;
&lt;TD class="r b data"&gt;NA&lt;/TD&gt;
&lt;TD class="r b data"&gt;72.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 20:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847956#M335236</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-12-05T20:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847959#M335238</link>
      <description>My actual data came from PROC means and when I transposed it by visit, with id being treatment, that’s when the blanks appeared bc not every treatment had a visit</description>
      <pubDate>Mon, 05 Dec 2022 21:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847959#M335238</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T21:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847963#M335240</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/252358"&gt;@Hello_there&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;My actual data came from PROC means and when I transposed it by visit, with id being treatment, that’s when the blanks appeared bc not every treatment had a visit&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show the code.&amp;nbsp; I have never seen PROC MEANS make some thing that looks like '3 (4)' as output.&amp;nbsp; I generally only creates numeric values.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 21:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847963#M335240</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-05T21:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847967#M335242</link>
      <description>That was an extra step I took to get it into the format I needed in an intermediary data step. This is my personal computer so I don’t have access to the actual output. &lt;BR /&gt;&lt;BR /&gt;But when you use PROC means to get summary statistics by visit for each treatment, it only summarizes the actual data in the raw data set. When you transpose it, there will be missing values for treatments that didn’t have a visit. &lt;BR /&gt; For example, subjects in treatment one can have data for visit 001, but if treatment 2 doesn’t have data for visit 001, then it will be blank. &lt;BR /&gt;&lt;BR /&gt;My example wasn’t really accurate in the OP bc one of the treatments has to have data for a visit to populate in the data step. If there is no data for all treatments, there are no visits. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2022 21:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847967#M335242</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T21:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847972#M335243</link>
      <description>&lt;P&gt;So do the step to add the visits before the proc means.&amp;nbsp; Then the step that is making it pretty for the transpose can deal with the missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't have a dataset with the set of valid id*visit combination you can easily make one.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input id visit value ;
cards ;
1 1 100
1 2 112
2 1 200
3 2 300
;
proc sql ;
create table for_analysis as 
select * 
from have 
natural full join 
  ( select * from (select distinct id from have),(select distinct visit from have) )
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1670275271466.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78081iB21A70F1700503B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1670275271466.png" alt="Tom_0-1670275271466.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 21:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847972#M335243</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-05T21:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847976#M335246</link>
      <description>This works also! &lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2022 21:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847976#M335246</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T21:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847978#M335247</link>
      <description>The array would be more efficient though right? Because if you did the extra step, you would still have to address the missing values at the end. But maybe this way is less lines of code.</description>
      <pubDate>Mon, 05 Dec 2022 21:29:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847978#M335247</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T21:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to fill in blank cells w/ NA?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847999#M335266</link>
      <description>Do you know if it's possible to output this into a data set? I try use "ods output out=xyz" in a separate line of code, but doesn't work.</description>
      <pubDate>Mon, 05 Dec 2022 22:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-most-efficient-way-to-fill-in-blank-cells-w-NA/m-p/847999#M335266</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-12-05T22:31:41Z</dc:date>
    </item>
  </channel>
</rss>

