Skip to content

Commit

Permalink
dplyr pull() used to extract a single column #17
Browse files Browse the repository at this point in the history
  • Loading branch information
kassambara committed Aug 2, 2017
1 parent 6f7419b commit 1d1a0ed
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -755,10 +755,7 @@ p

# Select a colun as vector from tiblle data frame
.select_vec <- function(df, column){
if(is.numeric(column))
df %>% dplyr::select(column) %>% unlist(use.names = FALSE)
else
df %>% dplyr::select_(.dots = column) %>% unlist(use.names = FALSE)
dplyr::pull(df, column)
}

# Select the top up or down rows of a data frame sorted by variables
Expand Down

0 comments on commit 1d1a0ed

Please sign in to comment.