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

Feature suggestion - extend fct_relevel( ) with after= argument #29

Closed
aleczwart opened this Issue Sep 1, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@aleczwart
Copy link

aleczwart commented Sep 1, 2016

Hi Hadley, nice work on this package.

I'd like to suggest an extension to fct_relevel() - an after= argument (a single level specified as a character string or default NA) which specifies a level after which the other levels are to be placed, in the specified order. This would be much more flexible than only moving levels only to the beginning of the level set.

I have a movebefore function for re-ordering data frame columns which is surprisingly useful - often the desired ordering can be obtained with minimal typing with this function. (I use 'before' rather than 'after', but 'after' might fit in better with the current behaviour of fct_relevel()...).

Cheers,
Alec

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Sep 9, 2016

Seems reasonable to me - do you want to have a go at a PR? (Ideally you should be able to supply after as either a numeric position or a named level)

@aleczwart

This comment has been minimized.

Copy link

aleczwart commented Sep 10, 2016

Ø Seems reasonable to me - do you want to have a go at a PR?
I’m new to all this, but, sure – why not? I’ll take a look, see if I can implement a solution…

A

From: Hadley Wickham [mailto:notifications@github.com]
Sent: Saturday, 10 September 2016 12:20 AM
To: hadley/forcats forcats@noreply.github.com
Cc: Zwart, Alec (Data61, Acton) Alec.Zwart@data61.csiro.au; Author author@noreply.github.com
Subject: Re: [hadley/forcats] Feature suggestion - extend fct_relevel( ) with after= argument (#29)

Seems reasonable to me - do you want to have a go at a PR?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/29#issuecomment-245926700, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AP7CVy5m2Lk3lAhRD51Z6Do1UT2d8CRgks5qoWshgaJpZM4Jya-w.

@hadley hadley closed this in 9c593a4 Dec 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment