In this video, Mark Niemann-Ross demonstrates the use of functions from the foreign package to import SPSS data files. Learn how to use read.ssd and write.foreign.
- [Instructor] SAS is a powerful statistics tool…and the foreign library in R provides ways…to work with that data set.…However, if you're going to read a native SAS file…you're going to have to have access to SAS itself.…You can write SAS files out without SAS available.…With that in mind, let's look at how…the foreign library works.…Foreign is usually installed in the Base R package…but to activate it you'll need…to be sure to use the library command.…
We'll need some data to export and import…so I'm going to create a data frame called Smalldf…and you can see that over in the Global Environment.…What's in it isn't important, it's just example data.…To read a native SAS file you'll use read.ssd…then you'll specify the directory of the file…that you're going to import, it's actually a package.…And again, this requires a copy of SAS…because what's going to happen is read.ssd…is actually going to create a program…that will then have to be run inside of SAS.…
If you don't have access to SAS…you're going to have to find someone with a copy of it…
- Name the three types of big data.
- List three considerations used to determine the appropriate R package for Excel.
- Determine the best package used to import entire Excel workbooks.
- Explain how to import standard text files using base R and tidyverse.
- Define the purpose of the foreign language package for R.
- Recognize restrictions when working on SAS files in the foreign language package.
- Identify the problems involved with extracting data from a PDF in R.
Skill Level Intermediate
R Programming in Data Science: High Volume Datawith Mark Niemann-Ross1h 25m Intermediate
1. Use R with Excel
2. Importing Text Files
3. Understanding the Foreign Package
4. Use R with Popular Data Formats
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.