<?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 How do you select a cell in dataset using their row and column? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787975#M32343</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to ba able to use this in a loop like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data name; set dataset1;&lt;BR /&gt;do n = 1 to 100 ;&amp;nbsp;&lt;BR /&gt;y = row n+1 value of a certain variable - row n value of that variable;&lt;BR /&gt;output ;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can you help me writing y?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Jan 2022 08:19:19 GMT</pubDate>
    <dc:creator>lila_lmp</dc:creator>
    <dc:date>2022-01-01T08:19:19Z</dc:date>
    <item>
      <title>How do you select a cell in dataset using their row and column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787975#M32343</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to ba able to use this in a loop like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data name; set dataset1;&lt;BR /&gt;do n = 1 to 100 ;&amp;nbsp;&lt;BR /&gt;y = row n+1 value of a certain variable - row n value of that variable;&lt;BR /&gt;output ;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can you help me writing y?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 08:19:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787975#M32343</guid>
      <dc:creator>lila_lmp</dc:creator>
      <dc:date>2022-01-01T08:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do you select a cell in dataset using their row and column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787978#M32345</link>
      <description>&lt;P&gt;Below one option how to do this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  do i=1 to 200;
    myvar+i*i;
    output;
  end;
run;

data want;
  set have(obs=100);
  set have(firstobs=2 keep=myvar rename=(myvar=myvarPlusOne));
  y=myvarPlusOne-myvar;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 01 Jan 2022 08:48:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787978#M32345</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-01-01T08:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you select a cell in dataset using their row and column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787979#M32346</link>
      <description>Thank you Patrick !!!</description>
      <pubDate>Sat, 01 Jan 2022 09:25:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787979#M32346</guid>
      <dc:creator>lila_lmp</dc:creator>
      <dc:date>2022-01-01T09:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do you select a cell in dataset using their row and column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787981#M32347</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
 set sashelp.heart;
run;

%let col=4;
%let row=6;

data _null_;
set sashelp.vcolumn(where=(libname='WORK' and memname='HAVE' and varnum=&amp;amp;col.));
call execute(cat('data want;set have;if _n_= ',&amp;amp;row.,';keep ',name,';run;'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 01 Jan 2022 09:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-select-a-cell-in-dataset-using-their-row-and-column/m-p/787981#M32347</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-01-01T09:36:27Z</dc:date>
    </item>
  </channel>
</rss>

