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

Drop purrr dependency #158

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Drop purrr dependency #158

merged 1 commit into from
Jul 3, 2024

Conversation

hadley
Copy link
Member

@hadley hadley commented Jul 2, 2024

No description provided.

@hadley hadley requested a review from lionel- July 2, 2024 20:50
Comment on lines +330 to +331
stacks <- lapply(prof_split, function(x) pad(rev(x$label)))
stacks <- as.data.frame(do.call(rbind, stacks))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify the existing code because we already have a list of vectors where every vector is the same length.

Could also do:

stacks <- vapply(prof_split, function(x) pad(rev(x$label)), character(max_depth))
stacks <- as.data.frame(t(stacks))

But I don't think that's much of an improvement.

@hadley hadley merged commit 9955c74 into main Jul 3, 2024
13 checks passed
@hadley hadley deleted the drop-purrr branch July 3, 2024 12:15
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

Successfully merging this pull request may close these issues.

2 participants