I have some R code that looks as follows:
rawList <- df %>% select(colIndex) %>% top_n(rows)
This executes as I would expect, but when it runs, I get output that looks like this:
Selecting by ReadTime
I just recently added the top_n() code and never saw this message before adding this function. Now I'm starting to see it. I assume it's comming from the top_n() function, and I cannot find a way to suppress this message.
That message appears when you don't explicitly pass a wt parameter to top_n to tell it which column to use select the top values for.
Compare
dd <- data.frame(x = c(10, 4, 1, 6, 3, 1, 1))
dd %>% top_n(2)
# Selecting by x
dd %>% top_n(2, x) # use column name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With