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

[FEATURE REQUEST] mutate(across()) ? #110

Open
jayoung opened this issue Apr 10, 2024 · 0 comments
Open

[FEATURE REQUEST] mutate(across()) ? #110

jayoung opened this issue Apr 10, 2024 · 0 comments

Comments

@jayoung
Copy link

jayoung commented Apr 10, 2024

Hi there,

I've been enjoying plyranges - thank you!

Would it be possible to add a mutate(across()) sort of functionality? (or maybe it already exists and I haven't found it)

I'm finding mutate(across()) very useful for mutating multiple columns of tibbles, and would love to do the same for GRanges objects. Right now I'm cheating by doing this sort of thing:

gr %>% 
  as.data.frame() %>% 
  mutate(across(starts_with("counts"), function(x) {log2(x)} )) %>% 
  as("GRanges")

Which isn't too bad really, but it might be nice to avoid going back and forth.

thanks!

Janet


Dr. Janet Young

Staff scientist, Malik lab
http://research.fhcrc.org/malik/en.html

Division of Basic Sciences
Fred Hutchinson Cancer Center


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