Skip to content

shift no longer works on matrix type under 1.14.3 #5287

@ethanbsmith

Description

@ethanbsmith

shift used to work on matrix columns, but now generates and error. i dont see anything in the NEWS. is this intentional as its a breaking change?

works in 1.14.0

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.2    tools_4.1.2       data.table_1.14.0 checkpoint_1.0.0 
> data.table::shift(matrix(1:10, ncol = 1))
 [1] NA  1  2  3  4  5  6  7  8  9

not working under 1.14.3

 sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.2    tools_4.1.2       data.table_1.14.3 checkpoint_1.0.0 
> data.table::shift(matrix(1:10, ncol = 1))
Error in data.table::shift(matrix(1:10, ncol = 1)) : 
  'as' must not be matrix or array

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions