-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.html
More file actions
531 lines (487 loc) · 19.3 KB
/
install.html
File metadata and controls
531 lines (487 loc) · 19.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Install | fastrerandomize</title>
<link rel="icon" type="image/png" href="figures/FRR_logo.png" />
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" />
<link rel="stylesheet" href="styles.css"/>
</head>
<body>
<!-- Raining Vectors Background Canvas -->
<canvas id="background-canvas"></canvas>
<!-- Header + Navigation -->
<header>
<nav>
<div class="logo">
<a href="index.html" aria-label="FastRerandomize home">
<img src="figures/FRR_logo.png" alt="FastRerandomize" />
</a>
</div>
<!-- HAMBURGER BUTTON -->
<button class="menu-toggle" aria-label="Toggle Menu">
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
</button>
<!-- /HAMBURGER BUTTON -->
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="install.html" class="active" aria-current="page">Install</a></li>
<li><a href="tutorials.html">Tutorials</a></li>
<li><a href="https://github.com/cjerzak/fastrerandomize-software/blob/main/fastrerandomize.pdf?raw=true">Documentation</a></li>
<li><a href="aboutus.html">About</a></li>
</ul>
<!-- Search Container -->
<div class="search-container">
<form onsubmit="return false;">
<i class="fas fa-search search-icon"></i>
<input type="text" class="search-input" placeholder="Search docs..." aria-label="Search documentation">
</form>
<!-- The search results will be automatically inserted by JavaScript -->
</div>
</nav>
<!-- Slim Hero Section for the Install Page -->
<div class="hero-slim">
<div class="hero-content animate-fade-in">
<h1>Install fastrerandomize</h1>
<p>Set up the FastRerandomize package in a clean, hardware-aware workflow.</p>
</div>
</div>
</header>
<!-- Main Content -->
<main>
<!-- Share Button -->
<div class="share-container">
<button id="share-button">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="18" cy="5" r="3"></circle>
<circle cx="6" cy="12" r="3"></circle>
<circle cx="18" cy="19" r="3"></circle>
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line>
<line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>
</svg>
Share
</button>
</div>
<!-- Installation Instructions Section -->
<section class="install-section">
<div class="install-card animate-fade-in">
<div class="new-to-rerandomization">
New to rerandomization? See the <a href="tutorials.html#key-concepts">Tutorials "Key Concepts" box</a> for the acceptance rule (M ≤ a), acceptance probability q, and design-respecting inference.
</div>
<h1>Install fastrerandomize</h1>
<p>To install and load fastrerandomize, follow these steps:</p>
<ol>
<li>
<p>Open your preferred R editor.</p>
</li>
<li>
<p>If you haven't installed devtools already, begin by doing so:</p>
<div class="code-block">
<div class="code-content">install.packages("devtools")</div>
<button class="copy-button" aria-label="Copy code">Copy</button>
</div>
</li>
<li>
<p>Install the latest package version from GitHub (a CRAN version is also available):</p>
<div class="code-block">
<div class="code-content">devtools::install_github("cjerzak/fastrerandomize-software", subdir = "fastrerandomize")</div>
<button class="copy-button" aria-label="Copy code">Copy</button>
</div>
</li>
<li>
<p>Load the package:</p>
<div class="code-block">
<div class="code-content">library(fastrerandomize)</div>
<button class="copy-button" aria-label="Copy code">Copy</button>
</div>
</li>
<li>
<p>When running code for the first time, create the computational environment:</p>
<div class="code-block">
<div class="code-content">fastrerandomize::build_backend()</div>
<button class="copy-button" aria-label="Copy code">Copy</button>
</div>
</li>
<li>
<p>Rerandomize!</p>
</li>
</ol>
<!-- Tips Card -->
<div class="tips-card">
<h3><i class="fas fa-lightbulb"></i> Installation Tips</h3>
<ul>
<li>Ensure you have R version 4.3 or higher installed.</li>
<li>System requirements: Python 3.11+ plus reticulate, JAX/JAXLIB, and NumPy (installed by the backend).</li>
<li><code>build_backend()</code> creates a minimal conda environment and selects CPU/GPU/TPU automatically.</li>
<li>If you encounter any errors during installation, open an issue on <a href="https://github.com/cjerzak/fastrerandomize-software/issues">GitHub</a>.</li>
<li>For GPU acceleration, ensure compatible CUDA (NVIDIA) or Metal (Apple) drivers are installed.</li>
</ul>
</div>
</div>
<div class="section-card animate-fade-in">
<p class="eyebrow">Citation</p>
<h3>Reference the SoftwareX article</h3>
<p>
Connor T. Jerzak, Rebecca Goldstein, Aniket Kamat, and Fucheng Warren Zhu.
FastRerandomize: An R Package for Fast Rerandomization Using Accelerated Computing.
SoftwareX, 2026.
</p>
<div class="citation-card">
<pre><code>@article{jerzak2025fastrerandomize,
title={FastRerandomize: An R Package for Fast Rerandomization Using Accelerated Computing},
author={Jerzak, Connor T. and Rebecca Goldstein and Aniket Kamat and Fucheng Warren Zhu},
journal={SoftwareX},
year={2026}
}</code></pre>
</div>
</div>
<!-- Next Steps Section -->
<h2 class="section-heading">What's Next?</h2>
<div class="next-steps">
<div class="next-step-card">
<div class="next-step-icon">
<i class="fas fa-book"></i>
</div>
<h4>Read Documentation</h4>
<p>Explore the comprehensive documentation to learn about all the features and functions available.</p>
<a href="https://github.com/cjerzak/fastrerandomize-software/blob/main/fastrerandomize.pdf?raw=true" class="btn btn-secondary">View Docs</a>
</div>
<div class="next-step-card">
<div class="next-step-icon">
<i class="fas fa-graduation-cap"></i>
</div>
<h4>Follow Tutorials</h4>
<p>Work through our step-by-step tutorials to get familiar with rerandomization techniques.</p>
<a href="tutorials.html" class="btn btn-secondary">Start Learning</a>
</div>
<div class="next-step-card">
<div class="next-step-icon">
<i class="fas fa-code"></i>
</div>
<h4>View Examples</h4>
<p>Check out example code snippets and real-world applications to jumpstart your projects.</p>
<a href="tutorials.html" class="btn btn-secondary">See Examples</a>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer>
<div class="footer-content">
<div class="footer-column">
<h4>Documentation</h4>
<ul class="footer-links">
<li><a href="install.html">Installation Guide</a></li>
<li><a href="https://github.com/cjerzak/fastrerandomize-software/blob/main/fastrerandomize.pdf?raw=true">API Reference</a></li>
<li><a href="tutorials.html">Tutorials</a></li>
</ul>
</div>
<div class="footer-column">
<h4>Community</h4>
<ul class="footer-links">
<li><a href="https://github.com/cjerzak/fastrerandomize-software">GitHub</a></li>
<li><a href="https://github.com/cjerzak/fastrerandomize-software/issues">Issue Tracker</a></li>
<li><a href="https://cran.r-project.org/package=fastrerandomize">CRAN</a></li>
<li><a href="https://github.com/cjerzak/fastrerandomize-software/commits/main/">Changelog</a></li>
</ul>
</div>
<div class="footer-column">
<h4>Resources</h4>
<ul class="footer-links">
<li><a href="https://arxiv.org/abs/2501.07642">Paper</a></li>
<li><a href="https://connorjerzak.com/wp-content/uploads/2025/01/FastReandomizeBib.txt">How to Cite</a></li>
<li><a href="figures/benchmarks.png">Benchmarks</a></li>
<li><a href="tutorials.html">Examples</a></li>
</ul>
</div>
<div class="footer-column">
<h4>About</h4>
<ul class="footer-links">
<li><a href="aboutus.html">Team</a></li>
<li><a href="mailto:connor.jerzak@austin.utexas.edu">Contact</a></li>
<li><a href="https://github.com/cjerzak/fastrerandomize-software?tab=License-1-ov-file#readme">License</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>© 2026 fastrerandomize developers. All rights reserved.</p>
</div>
</footer>
<!-- Scripts -->
<script>
// MENU TOGGLE LOGIC
const menuToggle = document.querySelector('.menu-toggle');
const nav = document.querySelector('nav');
menuToggle.addEventListener('click', () => {
nav.classList.toggle('open');
});
// COPY-BUTTON LOGIC for code blocks
document.querySelectorAll('.copy-button').forEach(button => {
button.addEventListener('click', () => {
const codeContent = button.parentElement.querySelector('.code-content').innerText;
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(codeContent);
} else {
const textArea = document.createElement('textarea');
textArea.value = codeContent;
document.body.appendChild(textArea);
textArea.select();
document.execCommand('copy');
document.body.removeChild(textArea);
}
// Simple feedback
button.textContent = 'Copied!';
setTimeout(() => {
button.textContent = 'Copy';
}, 1500);
});
});
// SHARE BUTTON LOGIC
(function() {
const shareBtn = document.getElementById('share-button');
function showCopyNotification() {
const notification = document.createElement('div');
notification.className = 'copy-notification';
notification.innerText = 'Link copied to clipboard';
document.body.appendChild(notification);
setTimeout(() => {
notification.remove();
}, 2000);
}
shareBtn.addEventListener('click', function() {
const currentURL = window.location.href;
const pageTitle = document.title || 'Install fastrerandomize';
if (navigator.share) {
navigator.share({
title: pageTitle,
text: 'Check out fastrerandomize - an R package for fast rerandomization using accelerated computing',
url: currentURL
})
.catch((error) => {
console.log('Sharing failed', error);
});
} else {
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(currentURL).then(() => {
showCopyNotification();
}, (err) => {
console.error('Could not copy text: ', err);
});
} else {
const textArea = document.createElement('textarea');
textArea.value = currentURL;
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
showCopyNotification();
} catch (err) {
alert('Please copy this link:\n' + currentURL);
}
document.body.removeChild(textArea);
}
}
});
})();
/*
"Raining Vectors" Background
*/
const canvas = document.getElementById('background-canvas');
const ctx = canvas.getContext('2d');
// Mathy / vector / stats symbols
const symbols = [
'∂','∇','λ','α','δ','θ','Σ','∫','×','→','±','β','μ','Ω','σ','Φ',
'∞','π','ξ','ζ','γ','ε','∛','∝','∠','∧','∨','∩','∪','≈','≠','≤','≥',
'≡','∈','∉','⊂','⊃','⊆','⊇','⊕','⊗','⊥','Z','P','R','N'
];
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
let width, height;
let columns;
let drops = [];
let sizes = [];
let speeds = [];
let opacities = [];
let hues = [];
// Resize canvas
function resizeCanvas() {
width = window.innerWidth;
height = window.innerHeight;
canvas.width = width;
canvas.height = height;
columns = Math.floor(width / 20);
drops = [];
sizes = [];
speeds = [];
opacities = [];
hues = [];
for (let i = 0; i < columns; i++) {
drops[i] = Math.random() * -100;
sizes[i] = 10 + Math.floor(Math.random() * 10);
speeds[i] = 0.05 + Math.random() * 0.2;
opacities[i] = 0.04 + Math.random() * 0.1;
hues[i] = 210 + Math.random() * 20;
}
}
window.addEventListener('resize', resizeCanvas);
resizeCanvas();
function draw() {
ctx.fillStyle = prefersDark ? 'rgba(12, 13, 16, 0.12)' : 'rgba(247, 246, 242, 0.08)';
ctx.fillRect(0, 0, width, height);
for (let i = 0; i < drops.length; i++) {
const text = symbols[Math.floor(Math.random() * symbols.length)];
const x = i * 20;
const y = drops[i] * 20;
ctx.font = `${sizes[i]}px monospace`;
const lightness = prefersDark ? 70 : 30;
ctx.fillStyle = `hsla(${hues[i]}, 40%, ${lightness}%, ${opacities[i]})`;
ctx.fillText(text, x, y);
drops[i] += speeds[i];
if (y > height && Math.random() > 0.99) {
drops[i] = -1;
speeds[i] = 0.05 + Math.random() * 0.2;
opacities[i] = 0.04 + Math.random() * 0.1;
}
}
}
setInterval(draw, 60);
// SEARCH FUNCTIONALITY
(function() {
// Content for quick search
const searchableContent = [
{
title: "Installation Guide",
description: "How to install and set up fastrerandomize package",
url: "install.html"
},
{
title: "Documentation",
description: "API reference and comprehensive documentation",
url: "https://github.com/cjerzak/fastrerandomize-software/blob/main/fastrerandomize.pdf?raw=true"
},
{
title: "CRAN Package",
description: "Official R package distribution",
url: "https://cran.r-project.org/package=fastrerandomize"
},
{
title: "Tutorials",
description: "Step-by-step guides for using fastrerandomize",
url: "tutorials.html"
},
{
title: "About",
description: "Information about the developers and contributors",
url: "aboutus.html"
},
{
title: "Monte Carlo Randomization",
description: "How to use Monte Carlo methods for randomization",
url: "index.html#tab2"
},
{
title: "Randomization Test",
description: "Performing statistical tests with rerandomization",
url: "index.html#tab3"
},
{
title: "Performance",
description: "CPU vs GPU benchmarks and scaling results",
url: "index.html#performance"
},
{
title: "Citation",
description: "SoftwareX reference and BibTeX entry",
url: "index.html#citation"
}
];
const searchInput = document.querySelector('.search-input');
const searchContainer = document.querySelector('.search-container');
const searchResults = document.createElement('div');
searchResults.className = 'search-results';
searchContainer.appendChild(searchResults);
function performSearch(query) {
searchResults.innerHTML = '';
if (!query.trim()) {
searchResults.style.display = 'none';
return;
}
const lowercaseQuery = query.toLowerCase();
const filteredResults = searchableContent.filter(item => {
return (
item.title.toLowerCase().includes(lowercaseQuery) ||
item.description.toLowerCase().includes(lowercaseQuery)
);
});
if (filteredResults.length > 0) {
searchResults.style.display = 'block';
filteredResults.forEach(result => {
const resultItem = document.createElement('a');
resultItem.href = result.url;
resultItem.className = 'search-result-item';
resultItem.innerHTML = `
<div class="search-result-title">${result.title}</div>
<div class="search-result-desc">${result.description}</div>
`;
searchResults.appendChild(resultItem);
});
} else {
searchResults.style.display = 'block';
searchResults.innerHTML = `
<div class="search-empty">No results found for "${query}"</div>
`;
}
}
searchInput.addEventListener('input', (e) => {
performSearch(e.target.value);
});
searchInput.addEventListener('focus', () => {
if (searchInput.value.trim()) {
performSearch(searchInput.value);
}
});
document.addEventListener('click', (e) => {
if (!searchContainer.contains(e.target)) {
searchResults.style.display = 'none';
}
});
const searchForm = searchInput.closest('form');
if (searchForm) {
searchForm.addEventListener('submit', (e) => {
e.preventDefault();
performSearch(searchInput.value);
});
}
searchInput.addEventListener('keydown', (e) => {
const results = searchResults.querySelectorAll('.search-result-item');
if (results.length === 0) return;
const activeElement = document.activeElement;
const isResultFocused = activeElement.classList.contains('search-result-item');
const currentIndex = isResultFocused ? Array.from(results).indexOf(activeElement) : -1;
if (e.key === 'ArrowDown') {
e.preventDefault();
if (currentIndex < results.length - 1) {
results[currentIndex + 1].focus();
} else {
results[0].focus();
}
} else if (e.key === 'ArrowUp') {
e.preventDefault();
if (currentIndex > 0) {
results[currentIndex - 1].focus();
} else {
results[results.length - 1].focus();
}
} else if (e.key === 'Escape') {
searchResults.style.display = 'none';
searchInput.blur();
}
});
})();
</script>
</body>
</html>