The pecora (permutation conditional random) package provides functions to perform the one-sample and two-samples t-tests using permutations/sign-flipping.

To install it:

# devtools::install_github("angeella/pecora")
install.packages("pecora", repos = c('https://angeella.r-universe.dev', 'https://cloud.r-project.org'))

library(pecora)

A toy example:

X <- matrix(rnorm(10*100000,5,sd=5),100000,10)

system.time(out1 <- oneSample(X,1000))