From the course: Descriptive Healthcare Analytics in R

Unlock the full course today

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

Operations in code

Operations in code - R Tutorial

From the course: Descriptive Healthcare Analytics in R

Start my 1-month free trial

Operations in code

- [Instructor] So far we've gotten our feet a little wet with a few operations. I showed you equals equals, which means, of course, equals. I showed you less than. Remember when we subsetted by the alcohol variable? I also showed you the pipe, which is how you indicate or in your conditions if you want to say this or that. But in this movie, I'll go through some of the operations I haven't mentioned yet. I'll talk about using code to indicate missings in R. How to negate operations such as not equal. And how to say and in R language. Here on the slide are the ones we have used so far in the course. Notice the double equals for equals. Don't forget that. You'll understand why when I show you not equals on the next slide. The next is a less than example. And in the next one, see how we use this pipe as an or to say less than 777 or equal to 888. Here are a few other examples we didn't use. Often times you want a range of a continuous or ordinal variable. Remember our AGE variable in…

Contents