You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that there is a bug with string values handling in DynamicVector class - when trying to get NA value, it is converted into 'NA' string and not in null value (like CharacterVector does).
Here is code to reproduce when working with DynamicVector's via DataFrame class:
private static void TestNa(REngine engine)
{
engine.Evaluate("options(stringsAsFactors = FALSE)");
var df = engine.Evaluate("data.frame(col_str = c('AAA', NA_character_))").AsDataFrame();
var col_str = df["col_str"];
var val1 = col_str[1]; // 'NA' - not expected
var val2 = col_str.AsCharacter()[1]; // null - expected
}
It seems that method DynamicVector.ReadString() misses check for NaStringPointer which exists in CharacterVector.GetValue() method.
The text was updated successfully, but these errors were encountered:
It seems that there is a bug with string values handling in
DynamicVector
class - when trying to get NA value, it is converted into 'NA' string and not innull
value (likeCharacterVector
does).Here is code to reproduce when working with DynamicVector's via DataFrame class:
It seems that method
DynamicVector.ReadString()
misses check forNaStringPointer
which exists inCharacterVector.GetValue()
method.The text was updated successfully, but these errors were encountered: