Question Details

No question body available.

Tags

c++ r rcpp

Answers (1)

Accepted Answer Available
Accepted Answer
January 8, 2026 Score: 4 Rep: 33,851 Quality: Expert Completeness: 80%

You need to convert widedata to a dataframe so subsetting it returns the proper 10x9 matrix (as.data.frame(widedata));

runinpar_cpp3  6  2023-10-25    247      0 0.09437325     5    X6        1
#> 7  2023-10-25    247      0 0.09437325     5    X7        1
#> 8  2023-10-25    247      0 0.09437325     5    X8        1
#> 9  2023-10-25    247      0 0.09437325     5    X9        1
#> 10 2023-10-25    247      0 0.09437325     5   X10        1

Created on 2026-01-08 with reprex v2.1.1