When applying InsertRow on a data frame containing a variable that is the result of scale(), its dimensions are increased, leading to possibly strange results.
Example:
test <- data.frame(matrix(rnorm(100), ncol=5))
test$X1s <- scale(test$X1)
InsertRow(test, NewRow=(rep(1,6)), RowNum = 15) -> test
dim(test)
#> [1] 21 6
dim(scale(test)) # ???
#> [1] 21 11
When applying InsertRow on a data frame containing a variable that is the result of scale(), its dimensions are increased, leading to possibly strange results.
Example: