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

minimal support for raw, e.g. map_raw, map2_raw, imap_raw, `fla… #345

Closed
wants to merge 15 commits into from
Closed

Conversation

romainfrancois
Copy link
Member

…tten_raw`

I have a potential use case for map_raw to eliminate e.g. this sapply : https://github.com/ThinkRstat/tipixel/blob/master/R/generate_base.R#L22

@romainfrancois
Copy link
Member Author

I added a bunch of tests and some support for coercion as well:

> raws <- as.raw(0:2)
> map( raws, 1)
[[1]]
[1] 00

[[2]]
[1] 01

[[3]]
[1] 02

> map_raw(raws, 1)
[1] 00 01 02
> map_int(raws, 1)
[1] 0 1 2
> map_dbl(raws, 1)
[1] 0 1 2
> map_chr(raws, 1)
[1] "00" "01" "02"

@hadley
Copy link
Member

hadley commented Feb 4, 2018

Can you please merge/rebase and take a look at improving the test coverage?

@hadley
Copy link
Member

hadley commented Feb 5, 2018

Looks like something went wrong with the merge - there are a lot of spurious diffs

@romainfrancois
Copy link
Member Author

yeah that's weird. I'll make another cleaner pr.

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