-
Notifications
You must be signed in to change notification settings - Fork 41
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
Make Rfloat
, Rint
, and friends ToVectorValue
.
#593
Conversation
Alright, except some more polish, I believe this is ready for review. Pinging @JosiahParry, @daniellga and @Ilia-Kosenkov for reviews / opinions. |
@CGMossa thank you so much for making this PR! My naive eyes think its looks okay but im not even close to an expert here :P |
@CGMossa thanks for adding extra tests and comments! Looks good to my novice eyes! |
@CGMossa there's one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run cargo fmt
Fixes #592
This PR does two things:
Makes
Rints
,&Rints
,Rfloat
, and&Rfloat
asToVectorValue
, as these are wrapped Rust typesthat are safe to assume would translate to R. Moreover
Rbool
and&Rbool
were alreadyToVectorValue
,so it could have been a slight oversight
We are increasingly promoting
Integers
,Logicals
,Doubles
, andComplexes
as the better wayto extract vectors from R. Thus to make these more easier to work with, I've added
TryFrom<Vec<RustNative>>
for all of them. This was previously accomplished withfrom_values
,but I think these are intuitive interface for these as well.