Blog Archives

The %notin% operator

July 8, 2018

Problem I keep forgetting how to select all elements of an object except a few, by name. I get the ! operator confused with the - operator and I find both of them less than intuitive to use. How can I negate the %in% operator? Context I have a data frame called electrofishing that contains observations … Continue reading "The...

Read more »

Where are my NA’s?

July 5, 2018

Problem How can I (quickly and intuitively) figure out how many NA’s are in my dataset and which columns they’re in? Context When I tried to run PCA (Principal Components Analysis) on some USGS fish sampling data, I noticed that I had a bunch of missing values. PCA needs complete observations, so this was a … Continue reading "Where...

Read more »

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)