In this video, Mark Niemann-Ross demonstrates several methods of working with text files. Learn about the use of base R and the tidyverse version of file import functions.
- [Instructor] Let's talk about importing…just standard text files and by standard text files…I mean something that's not formatted,…it's not comma separated, it's not tab delimited.…If you look down in chapter two exercise files…in the sample files folder,…I've provided the text for A Mid Summer Night's Dream,…which is a play, it's by Shakespeare…and you'll notice that this text file,…it has line breaks but there is no tabs,…there are no fields indicating the contents…of the next field or nothing's broken up,…it's just random text in a text file.…
But sometimes this is the way you're going to get data…and so we need to learn how to deal with it.…Let's look at four functions that we can use…to import text files and the results of each of them.…The first thing that I'm going to assume…is that you've changed your working directory…to the chapter 02…and that will make sure…that all of our code actually calls up the right files.…The next thing I'm going to do is create a vector…called sample text and into that I'm going to place…
- 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.