<?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: Cannot show read results in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Cannot-show-read-results/m-p/374052#M2930</link>
    <description>&lt;P&gt;Your code assumes that the file uses a tab as the delimiter. &amp;nbsp;But the file uses spaces as the delimiter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The DSD option in the infile statement will treat consecutive delimiters as a missing value. &amp;nbsp;You don't want that, because the values in the file are separated by two or three spaces. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "/home/ydu180/project/housing.data";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings15/3210-2015.pdf" target="_blank"&gt;Can you read this into SAS® for me? “Using INFILE and INPUT to Load Data Into SAS®&lt;/A&gt; has lots of examples of reading external files into SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2017 18:09:09 GMT</pubDate>
    <dc:creator>SuzanneDorinski</dc:creator>
    <dc:date>2017-07-07T18:09:09Z</dc:date>
    <item>
      <title>Cannot show read results</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-show-read-results/m-p/374036#M2929</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname project "/home/ydu180/project";
title1"Project";

data project.ydu_18;
   infile "/home/ydu180/project/housing.data" dlm='09'x dsd truncover;
   input CRIM ZN INDUS CHAS NOX RM AGE DIS RAD TAX PTRATIO B LSTAT MEDV;
   format CRIM 8.5
          ZN 5.2 
          INDUS 6.3
          CHAS 1.0
          NOX 6.4
          RM 6.4
          AGE 5.2 
          DIS 7.4
          RAD 2.0 
          TAX 5.1
          PTRATIO 5.2
          B 6.2
          LSTAT 5.2
          MEDV 5.2;
   Label CRIM="per capita crime rate by town"
         ZN="proportion of residential land zoned for lots over 25,000 sq.ft."
         INDUS="proportion of non-retail business acres per town"
         CHAS="Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)"
         NOX="nitric oxides concentration (parts per 10 million)"
         RM="average number of rooms per dwelling"
         AGE="proportion of owner-occupied units built prior to 1940 "
         DIS="weighted distances to five Boston employment centres"
         RAD="index of accessibility to radial highways"
         TAX="full-value property-tax rate per $10,000"
         PTRATIO="pupil-teacher ratio by town"
         B="1000(Bk - 0.63)^2 where Bk is the proportion of blacks by town"
         LSTAT="% lower status of the population"
         MEDV="Median value of owner-occupied homes in $1000's";
run;

proc contents data=project.ydu_18;
run;

proc print data=project.ydu_18 label noobs;
   var CRIM ZN INDUS CHAS NOX RM AGE DIS RAD TAX PTRATIO B LSTAT MEDV;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;There are 506 instances for every 14 variables, so the total observations should be 7084. I got 506 rows and 14 columns, but there were all dots, which is like the following.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10202iB9AB44784DF35E91/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="微信图片_20170708011734.png" title="微信图片_20170708011734.png" /&gt;&lt;/P&gt;&lt;P&gt;The content shows I only have 506 observations. The source data website is&amp;nbsp;&lt;A href="http://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data" target="_blank"&gt;http://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data&lt;/A&gt; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone tell how I read this txt and can get those data shown on my results?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 17:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-show-read-results/m-p/374036#M2929</guid>
      <dc:creator>ydu180</dc:creator>
      <dc:date>2017-07-07T17:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot show read results</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-show-read-results/m-p/374052#M2930</link>
      <description>&lt;P&gt;Your code assumes that the file uses a tab as the delimiter. &amp;nbsp;But the file uses spaces as the delimiter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The DSD option in the infile statement will treat consecutive delimiters as a missing value. &amp;nbsp;You don't want that, because the values in the file are separated by two or three spaces. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "/home/ydu180/project/housing.data";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings15/3210-2015.pdf" target="_blank"&gt;Can you read this into SAS® for me? “Using INFILE and INPUT to Load Data Into SAS®&lt;/A&gt; has lots of examples of reading external files into SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 18:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-show-read-results/m-p/374052#M2930</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2017-07-07T18:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot show read results</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Cannot-show-read-results/m-p/374115#M2934</link>
      <description>Got that, thank you so much. As one of my assignment that data has spaces but use dlm="09"x, then I thought this will be the same. Thanks again.</description>
      <pubDate>Fri, 07 Jul 2017 22:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Cannot-show-read-results/m-p/374115#M2934</guid>
      <dc:creator>ydu180</dc:creator>
      <dc:date>2017-07-07T22:47:38Z</dc:date>
    </item>
  </channel>
</rss>

