tests/testthat/test-rowMultiply.R

context("rowMultiply")

n = 50; p = 100
mat = matrix(rnorm(n*p), n,p)
vec = rnorm(p)

test_that("Rowmultiply works", {
  expect_equal(rowMultiply(mat, vec), t(t(mat)*vec))
})

Try the combi package in your browser

Any scripts or data that you put into this service are public.

combi documentation built on Nov. 8, 2020, 5:34 p.m.