Cookies help us display personalized product recommendations and ensure you have great shopping experience.

By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
SmartData CollectiveSmartData Collective
  • Analytics
    AnalyticsShow More
    data analytics and truck accident claims
    How Data Analytics Reduces Truck Accidents and Speeds Up Claims
    7 Min Read
    predictive analytics for interior designers
    Interior Designers Boost Profits with Predictive Analytics
    8 Min Read
    image fx (67)
    Improving LinkedIn Ad Strategies with Data Analytics
    9 Min Read
    big data and remote work
    Data Helps Speech-Language Pathologists Deliver Better Results
    6 Min Read
    data driven insights
    How Data-Driven Insights Are Addressing Gaps in Patient Communication and Equity
    8 Min Read
  • Big Data
  • BI
  • Exclusive
  • IT
  • Marketing
  • Software
Search
© 2008-25 SmartData Collective. All Rights Reserved.
Reading: Importing Public Data with SAS Instructions into R
Share
Notification
Font ResizerAa
SmartData CollectiveSmartData Collective
Font ResizerAa
Search
  • About
  • Help
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
SmartData Collective > Uncategorized > Importing Public Data with SAS Instructions into R
Uncategorized

Importing Public Data with SAS Instructions into R

DavidMSmith
DavidMSmith
2 Min Read
SHARE

Many public agencies release data in a fixed-format ASCII (FWF) format. But with the data all packed together without separators, you need a “data dictionary” defining the column widths (and metadata about the variables) to make sense of them. Unfortunately, many agencies make such information available only as a SAS script, with the column information embedded in a PROC IMPORT statement.

Many public agencies release data in a fixed-format ASCII (FWF) format. But with the data all packed together without separators, you need a “data dictionary” defining the column widths (and metadata about the variables) to make sense of them. Unfortunately, many agencies make such information available only as a SAS script, with the column information embedded in a PROC IMPORT statement.

To solve this problem, R user Anthony Damico (who’s also the energetic voice behind the excellent R Twotorials series) created the SAScii package. It parses the SAS script (or even an unstructured text instructions file, with a PROC IMPORT statement included), and uses that information to read the associated fix-format ASCII file. Just provide the name or URL of the script/instructions file and the data file, and SAScii does the rest. There are several examples in the read.SAScii helpfile, including the R command to read the following public data sets:

More Read

The Soft Costs of Information Quality
Why LinkedIn Frustrates Me
Hallmark Fights Back
Is Unstructured Collaboration the Key to Business Agility?
6 Must-See Usability Testing Videos
  • 2009 Medical Expenditure Panel Survey Emergency Room Visits File (Medical Expenditure Panel Survey)
  • 2010 National Health Interview Survey Persons file (CDC)
  • IPUMS – American Community Survey Extract (Minnesota Population Center)
  • 2008 Survey of Income and Program Participation Wave 1 (US Census)

Many thanks to Anthony for creating this package and pointing it out to me at the useR!2102 conference last month. It unlocks many useful public data sets for those of us without SAS licenses.

SAScii package: read.SAScii documentation

Share This Article
Facebook Pinterest LinkedIn
Share

Follow us on Facebook

Latest News

data analytics and truck accident claims
How Data Analytics Reduces Truck Accidents and Speeds Up Claims
Analytics Big Data Exclusive
predictive analytics for interior designers
Interior Designers Boost Profits with Predictive Analytics
Analytics Exclusive Predictive Analytics
big data and cybercrime
Stopping Lateral Movement in a Data-Heavy, Edge-First World
Big Data Exclusive
AI and data mining
What the Rise of AI Web Scrapers Means for Data Teams
Artificial Intelligence Big Data Exclusive

Stay Connected

1.2kFollowersLike
33.7kFollowersFollow
222FollowersPin

You Might also Like

IBM Video – Business Analytics & Optimization (via…

1 Min Read
Image
Uncategorized

Which Big Data Personality Are You? [INFOGRAPHIC]

0 Min Read

Online advertising is all about purchasing intent

4 Min Read

Enhance Your CRM Data to Sharpen Your Sales Pitch

6 Min Read

SmartData Collective is one of the largest & trusted community covering technical content about Big Data, BI, Cloud, Analytics, Artificial Intelligence, IoT & more.

ai in ecommerce
Artificial Intelligence for eCommerce: A Closer Look
Artificial Intelligence
data-driven web design
5 Great Tips for Using Data Analytics for Website UX
Big Data

Quick Link

  • About
  • Contact
  • Privacy
Follow US
© 2008-25 SmartData Collective. All Rights Reserved.
Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?