Usage Arguments Details Value Examples
1 | top_records(n = 5, df, groupings)
|
n |
number of top records from dataset to return |
df |
data.frame object containing the data of interest |
groupings |
character vector that is the variable(s) by which to group_by for analysis. This must be input as a string or character vector |
I don't know why it won't work. The code below works just fine:
Wine_raw <- read.csv('C:/R/PracticalDataScience/data/winemag-data-130k-v2.csv')
test <- Wine_raw group_by_at( vars(one_of(c("points","price"))) ) summarise( count = n() ) arrange(desc(count)) head(5)
This code is exactly the same as how I've built the function, yet it keeps giving me an error. It has to be something to do with passing a character vetor into a function, but I don't know what to do about that. Nothing online talks about actually putting a character vector as input to a function, unless it's just printing something out.
Table summarized by specified variable and arranged by highest count to lowest count of occurence (as many as you specify)
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.