Skip to content

Commit 7dfac72

Browse files
hidekojicursoragent
andcommitted
fix(pca): emit Row Count metric name for #37268
Align with tam VizUtil key that already translates to 行数 without colliding with Number of Rows -> 行の数. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c03994e commit 7dfac72

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

R/prcomp.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ tidy.prcomp_exploratory <- function(x, type="variances", n_sample=NULL, pretty.n
347347
# #37268: rename Rows Used / Variables Used; drop redundant Rows vs Variables row;
348348
# refresh Description copy (and English-canonical strings for the client translator).
349349
res <- tibble::tibble(
350-
Metric = c("Number of Rows", "Rows Excluded", "Number of Variables", "Excluded Variables",
350+
Metric = c("Row Count", "Rows Excluded", "Number of Variables", "Excluded Variables",
351351
"Normalization", "SD Ratio (Max/Min)"),
352352
Value = c(
353353
as.character(d$analyzed_row_count),

tests/testthat/test_prcomp.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ test_that("new report tidy types return expected columns and tokens", {
9393
model_df <- mtcars %>% do_prcomp(mpg, cyl, disp, hp, drat, wt)
9494
res <- model_df %>% tidy_rowwise(model, type = "analysis_conditions")
9595
expect_equal(colnames(res), c("Metric", "Value", "Description", "status"))
96-
expect_true(all(c("Number of Rows","Number of Variables","Normalization","SD Ratio (Max/Min)") %in% res$Metric))
96+
expect_true(all(c("Row Count","Number of Variables","Normalization","SD Ratio (Max/Min)") %in% res$Metric))
9797
expect_false("Rows vs Variables" %in% res$Metric)
9898
expect_false("Rows Used" %in% res$Metric)
9999
expect_false("Variables Used" %in% res$Metric)
100+
expect_false("Number of Rows" %in% res$Metric)
100101
# #37268: empty excluded-variables cell is "None" (JA: なし), not "-".
101102
excluded_row <- res[res$Metric == "Excluded Variables", , drop = FALSE]
102103
if (nrow(excluded_row) == 1 && identical(excluded_row$status, "na")) {

0 commit comments

Comments
 (0)