Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,36 @@ After `runAnalysis()`, check:
- Use `createJaspTable()`, `createJaspPlot()`, `createJaspHtml()` for output elements
- Always set `$dependOn()` for proper caching and state management
- Use containers for grouping related elements, state objects for reusing computed results

## Container Environment (overrides Session Setup section above)

This is a **headless Docker container**. There is no interactive user.

### MANDATORY FIRST ACTION — R Session Connection

Before doing ANYTHING else (before reading code, before exploring the repo),
you MUST connect to the pre-started R session:

1. Call `list_r_sessions` to discover available sessions.
2. Call `select_r_session` to connect to the listed session.
3. Only then proceed with the workflow.

If `list_r_sessions` returns empty, the background R session failed to start.
Fall back to Bash for R execution. Do NOT spend more than 2 turns debugging.

This step is NOT optional. Without it, `btw_tool_run_r` will fail.

### Other container rules

- `session_startup.R` is NOT relevant here — ignore references to it.
- Do NOT run any git commands (the outer orchestrator handles git).

## Compact Instructions

When context is compacted, preserve:
- Current workflow stage (from /workspace/.openclaw-run/current_stage)
- Implementation plan (from /workspace/.openclaw-run/PLAN.md)
- The module name and original task description
- What git changes have been made so far

After compaction, re-read /workspace/.openclaw-run/RECOVERY.md to re-orient.
6 changes: 3 additions & 3 deletions R/msaGaugeRR.R
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,14 @@ msaGaugeRR <- function(jaspResults, dataset, options, ...) {
return(list(study = c(round(studyVar/max(studyVar) * 100,2))[1], tol = c(round(studyVar / options[["toleranceValue"]] * 100,2))[1]))

if (options[["varianceComponentsGraph"]]) {
plot <- createJaspPlot(title = gettext("Components of variation"), width = 850, height = 500)
plot <- createJaspPlot(title = gettext("Components of variation"), width = 950, height = 500)
plot$dependOn(c("varianceComponentsGraph", "report"))
plot$plotObject <- p
anovaTables[['VarCompGraph']] <- plot
}
} else {

plot <- createJaspPlot(title = gettext("Components of variation"), width = 850, height = 500)
plot <- createJaspPlot(title = gettext("Components of variation"), width = 950, height = 500)
plot$dependOn(c("gaugeVarCompGraph", "report"))

anovaTables[['anovaTable1']] <- anovaTable1
Expand Down Expand Up @@ -904,7 +904,7 @@ msaGaugeRR <- function(jaspResults, dataset, options, ...) {
}

.gaugeVarCompGraph <- function(percentContributionValues, studyVariationValues, percentToleranceValues, Type3 = FALSE) {
sources <- gettext(c('Gauge r&R', 'Repeat', 'Reprod', 'Part-to-part'))
sources <- gettext(c('Total Gauge R&R', 'Repeatability', 'Reproducibility', 'Part-to-Part'))
if (!all(is.na(percentToleranceValues))) {
references <- gettextf(c('%% Contribution', '%% Study variation', '%% Tolerance'))
values <- c(percentContributionValues, studyVariationValues, percentToleranceValues)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
253 changes: 253 additions & 0 deletions tests/testthat/_snaps/msaType1Gauge/1-bias-histogram.new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
247 changes: 247 additions & 0 deletions tests/testthat/_snaps/msaType1Gauge/2-bias-histogram.new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
248 changes: 248 additions & 0 deletions tests/testthat/_snaps/msaType1Gauge/3-bias-histogram.new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
176 changes: 176 additions & 0 deletions tests/testthat/_snaps/msaType1Gauge/4-bias-histogram.new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading