tests/testthat/test-sortBytes.R

context("sort bytes that are stored as mixed endian")
origVec <- c(1:10)
origVec_num <- as.numeric(c(1:10))

test_that("raw to int", {
  # Integer
  
  
  nByteSize <- 4
  rawVec <- writeBin(origVec, raw(), size = nByteSize, endian = "little")
  byte_order <- c(3,2,0,1)

  expect_equal(sortBytes(rawVec, byte_order), sortBytes1(rawVec, byte_order))
})

Try the flowCore package in your browser

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

flowCore documentation built on Nov. 8, 2020, 5:19 p.m.