# Create a collection of 3 overlapping variable sets of different sizes
var.sets = list(set1=1:10,
set2=1:20,
set3=1:30)
# Simulate a 100-by-100 matrix of random Poisson data
X = matrix(rpois(10000, lambda=1), nrow=100)
# Inflate first 10 rows for first 10 variables, i.e., the first
# 10 samples should have elevated scores for the first variable set
X[1:10,1:10] = rpois(100, lambda=5)
# Execute RESET using non-randomized basis computation
reset.out = reset(X, var.sets=var.sets, k=2, random.threshold=20)
# Display the overall scores
reset.out$v
# Convert to per-variable scores
reset.out.2 = convertToPerVarScores(reset.out=reset.out, var.sets=var.sets, to.per.var=TRUE)
# Display the overall scores in per-variable format
reset.out.2$v
# Convert from per-variable scores
reset.out.3 = convertToPerVarScores(reset.out=reset.out.2, var.sets=var.sets, to.per.var=FALSE)
# Display the overall scores
reset.out.3$v
Run the code above in your browser using DataLab