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

modify extractors functions to work with altrep_sparse vectors #22

Merged
merged 11 commits into from
Apr 30, 2024

Conversation

EmilHvitfeldt
Copy link
Member

@EmilHvitfeldt EmilHvitfeldt commented Apr 30, 2024

To close #8

library(sparsevctrs)


vec <- new_sparse_real(c(1, 6, 30, 2), c(2, 4, 6, 9), 10)

vec
#>  [1]  0  1  0  6  0 30  0  0  2  0

sparsevctrs:::.values(vec)
#> [1]  1  6 30  2
sparsevctrs:::.positions(vec)
#> [1] 2 4 6 9
length(vec)
#> [1] 10

Created on 2024-04-30 with reprex v2.1.0

@EmilHvitfeldt EmilHvitfeldt merged commit ec61ebb into main Apr 30, 2024
10 of 11 checks passed
@EmilHvitfeldt EmilHvitfeldt deleted the altrep-extractors branch April 30, 2024 20:56
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.

Add getters for altrep functions
1 participant