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 ...