Skip to Main Content
SAS for R Users
book

SAS for R Users

by Ajay Ohri
September 2019
Beginner to intermediate content levelBeginner to intermediate
208 pages
3h 17m
English
Wiley
Content preview from SAS for R Users

2Data Input, Import and Print

2.1 Importing Data

Importing data is the first step in analyzing data. It is important that you have reliable and relevant data. You should be able to import data correctly because the computer processes what data you input. If the imported data is faulty, the analysis that you will receive after performing various tasks on it will also be erroneous and misleading.

This concept is also commonly known as GIGO (Garbage In Garbage OUT). Therefore, the input step is one of the most important steps in the data science pipeline. There could also be different ways to input data in R and SAS from files or from data connections. Importing of datasets calls for certain functions in R whereas it calls for certain procedures for the same in SAS.

2.1.1 Packages in R

Importing of data in R can be done using certain packages and functions, and to use those packages, we need to install them in our application.

Installing a package has the following command in R:

After installation to use this package you must load that package. Loading a package means getting the package in active state (session). To load a package use:

Updating a package:

Note that we install the package only once, we update it occasionally and we load it every time we begin a R session. To unload a package, we use:

To uninstall a package ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Statistical Hypothesis Testing with SAS and R

Statistical Hypothesis Testing with SAS and R

Sonja Kuhnt, Dirk Taeger

Publisher Resources

ISBN: 9781119256410Purchase book