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

BEQS Empty column fix - Closes #99 #100

Merged
merged 6 commits into from Nov 23, 2015
Merged

BEQS Empty column fix - Closes #99 #100

merged 6 commits into from Nov 23, 2015

Conversation

@csrvermaak
Copy link
Contributor

@csrvermaak csrvermaak commented Nov 23, 2015

No description provided.

if(!all_chk){ // Check if any columns have not been checked successfully - these will all set to fallback NA
for (int i=0; i<cols; i++) {
if(!chk[i]){
lst[i] = Rcpp::CharacterVector(rows, R_NaString);

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 23, 2015
Member

That doesn't work.

We may be one of four types here. You are assuming it is always character when it might be numeric or date or ... and you cannot assign a character-NA to these others.

We might be able to assign R_NilValue.

This comment has been minimized.

@csrvermaak

csrvermaak Nov 23, 2015
Author Contributor

100% - happy to append. What class should it be: RawVector or GenericVector?

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 23, 2015
Member

I spoke to soon. Your logic is to fill the entire column j if it was never set? So that could work.

My preferred NA is numeric, but that is a small thing.

This comment has been minimized.

@csrvermaak

csrvermaak Nov 23, 2015
Author Contributor

Yes, the logic is: search for a type until found, then stop searching.

If no type found, there was no value in the column, thus entire column is NA.

This comment has been minimized.

@eddelbuettel

eddelbuettel Nov 23, 2015
Member

Which even I understood once I got to the third cup'o'joe ;-)

Thanks for the enhancement!

eddelbuettel added a commit that referenced this pull request Nov 23, 2015
BEQS Empty column fix - Closes #99
@eddelbuettel eddelbuettel merged commit 33731b7 into Rblp:master Nov 23, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
eddelbuettel added a commit that referenced this pull request Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.