Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using count on data frame with a column named freq #267

Open
stefanhillmann opened this issue Nov 11, 2015 · 0 comments
Open

Using count on data frame with a column named freq #267

stefanhillmann opened this issue Nov 11, 2015 · 0 comments

Comments

@stefanhillmann
Copy link

If you use the function count on a data frame that contains a column named 'freq', the method uses automatically the column 'freq' as weighting variable.

The behaviour occurs from lines 55 to 58 in count.r:
if (is.null(wt_var) && "freq" %in% names(df)) {
message("Using freq as weighting variable")
wt_var <- "freq"
}

Please add this very special behaviour to the method documentation, or remove it. I believe removing is the better solution as count(my_data, c('col_1'), wt_var = 'freq') does exactly the same thing...

Best,
Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant