Skip to content

dcast() test 2365.2 fail on R 3.5.0 #7652

@manmita

Description

@manmita

As pointed by @aitap in #7634 which fixes #7614

Test 2365.2 ran without errors but failed check that x equals y:
> x = dcast(df_dcast, a ~ b, value.var = "v") 
   a  1  2  [Key=a Types=int,int,int Classes=fac,int,int]
1: x  3 NA                                               
2: y NA  4                                               
> y = dcast(dt_dcast, a ~ b, value.var = "v") 
   a  1  2  [Key=a Types=cha,int,int Classes=cha,int,int]
1: x  3 NA                                               
2: y NA  4                                               
Datasets have different column modes. First 3: a(numeric!=character)

The output of dcast is different in type for data.table and data.frame as data.frame converts char to factors for R version < 4.0.0
And dcast returns same output type as it was there in input hence we get column type mismatch.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions