From the course: R Essential Training: Wrangling and Visualizing Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Entering data

Entering data

From the course: R Essential Training: Wrangling and Visualizing Data

Start my 1-month free trial

Entering data

- [Instructor] By far the easiest way to get a dataset of any meaningful size into R is to import it and I'm going to talk about that but I want to show you first how, for very small sets of data, for a particular variable or a particular calculation, it may be easiest to enter the data directly into R through the script window. Let me show you how this works. I'm going to use this script about entering data and let's come down to this first basic command. You can do basic math. Here I have two plus two. And to run that command, I'm going to hold down Command or Control and hit the Enter or Return key. When I do that, I get the result down here in the console. Now, the one in square brackets is not the result. That's an index number and that's there because R puts the results into vectors and it's telling you which item is the first one in that line. Now, there's only one so we just have the index number one.…

Contents