Error in seq_len: argument must be coercible to non-negative integer
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
No repository file or test is identified; start by reproducing the supplied get_table_list and output$spec_table code and capture the full traceback for the seq_len error. Inspect the operations involving op12, op11, and their differing dimensions. Done means the table renders without the seq_len error and the relevant output dimensions are handled correctly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
test_num_data <- lab_st_data %>%
filter(test_number %in% c(test_num_info$Run_test[i])) %>%
distinct(time_pull_B_M_E,parameter_name,parameter_cd,value_no,unit_desc,min_spec, max_spec, target_spec)
print(str(lab_st_data))
test_num_data110 <<- test_num_data
test_num_data <- test_num_data %>%
mutate(min_sd = min_spec - (0.05*min_spec),
max_sd = max_spec + (0.05*max_spec),
fin_spec= NA) %>%
mutate(fin_spec = ifelse(value_no <= max_spec & value_no >= min_spec,"#C4D79B",
ifelse(value_no < min_spec & value_no >= min_sd,"#FFFF00",
ifelse(value_no > max_spec & value_no <= max_sd,"#FFFF00",
ifelse(value_no > max_sd,"#FF0000",
ifelse(value_no < min_sd,"#FF0000","#F0F0F0")))))) %>%
select(-min_sd,-max_sd)
print("90")
test_num_data111 <<- test_num_data
test_num_data$fin_spec[is.na(test_num_data$fin_spec)] <- "#F0F0F0"
test_col_piv <- test_num_data %>%
select(-value_no,-min_spec, -max_spec, -target_spec) %>%
pivot_wider(names_from = c(time_pull_B_M_E),
values_from = c(fin_spec))
test_col_piv <- test_col_piv[,3:ncol(test_col_piv)]
colormatrix <- c(t(test_col_piv))
colormatrix[is.na(colormatrix)] <- "#F0F0F0"
test_num_piv <- test_num_data %>%
select(-fin_spec) %>%
pivot_wider(names_from = c(time_pull_B_M_E),
values_from = c(value_no))
print("60")
# test_num_piv <- merge(test_num_piv,spec_results[,c("Nutrient Testing","description","sort_no")],by.x = "parameter_cd",by.y = "parameter_cd")
# test_num_piv <- test_num_piv %>%
# arrange(sort_no) %>%
# select(-parameter_name,-parameter_cd,-sort_no)
# print("88")
# test_num_piv54 <<- test_num_piv
## Using left_join to merge based on 'parameter_cd'
test_num_piv <- test_num_piv %>%
inner_join(spec_results[, c("parameter_cd", "description", "sort_no")],
by = "parameter_cd") %>%
arrange(sort_no) %>%
select(-parameter_name,-parameter_cd, -sort_no)
test_num_piv54 <<- test_num_piv
ncol_sub <- ncol(test_num_piv)-1
test_num_piv <- cbind(description = test_num_piv$description,test_num_piv[,1:ncol_sub])
test_num_piv55 <<- test_num_piv
print("888")
test_num_piv <- test_num_piv %>%
rename("Parameter Name"=description,"Unit Desc"=unit_desc,"Min Spec"=min_spec,
"Max Spec"=max_spec,"Target Spec"=target_spec)
print("77")
box_title <- paste("Laboratory: ",lab_name," - Test Number: ",test_num_info$Run_test[i]," - Run Date: ",test_num_info$Run_date[i])
op <- as.data.frame(t(test_num_piv))
print("100")
op <- cbind(rownames(op),op)
colnames(op) <- op[1,]
op <- op[-1,]
col_dup <- make.unique(colnames(op))
colnames(op) <- col_dup
nrow_op <- nrow(op)
ncol_op <- ncol(op)
result_table <- uiOutput(op)
print(str(op))
print("137")
op12 <<- op
result_table <- renderUI({
op <- op %>%
flextable()
op <- op %>%
#theme_zebra() %>% # theme_booktabs() %>%
bg(bg = "#F0F0F0", part = "all") %>%
color(color = "#002288", part = "all") %>%
bg(i =5:nrow_op,j=2:ncol_op,bg=colormatrix) %>%
bold(j=1, bold = TRUE, part = "body") %>%
bold(bold = TRUE, part = "header") %>% #<= 0.05
font(fontname = 'Arial', part = "all") %>%
padding(padding = 0,part = "all") %>%
fontsize(size = 12, part = "header") %>%
fontsize(size = 11, part = "body") %>%
fontsize(j=1, size = 12, part = "body") %>%
align(align = "center", part = "all") %>%
border(border = fp_border(color = "#886600") , part = "all") %>%
border_outer(border = fp_border(color = "#000f3c", style = "solid", width = 2) , part = "all") %>%
autofit() %>%
height_all(height = 0.5, part = "all") %>% hrule(rule = "exact", part = "all") %>%
htmltools_value()
fluidRow(box(status = "primary",title = strong(box_title), collapsible = T,
height = NULL , width = 12, solidHeader = TRUE,
style = "overflow-y:scroll; overflow-x:scroll" ,#max-height: 400px;
op))
})
})
do.call(tagList, plot_output_list) # needed to display properly.
return(plot_output_list)
} this is my global code where op12 is giving me 7 obs and 65 variables in server I have similar table output which is op 11 gives 5 obs and 9 variables
output$spec_table <- renderUI({
if(is.null(spec_results)) return(NULL)
if(is.null(input$testname) || sum(input$testname == "")) {
test_name_info_spec <- unique(test_name_data_specs()$description)
} else{
test_name_info_spec <- input$testname
}
spec_results <- spec_results %>%
filter(description %in% c(test_name_info_spec)) %>%
select(-category_group,-sort_no,-`Nutrient Testing`,-formula_cd,-version,-created_by,-parameter_cd) %>%
rename("Unit Desc"=unit,"Min Spec"=min_spec,"Max Spec"=max_spec,"Target Spec"=target_spec,"Nutrient Testing" = description)
testname111 <<- input$testname
print(spec_results)
print(input$testname)
op <- as.data.frame(t(spec_results))
op <- cbind(rownames(op),op)
colnames(op) <- make.unique(colnames(op))
op11 <<- op
colnames(op) <- op[1,]
op <- op[-1,]
op <- op %>% flextable() %>% add_header_row(values=colnames(op), top=FALSE) %>% delete_rows(i=1,part="header")
op <- op %>%
#theme_zebra() %>% # theme_booktabs() %>%
bg(bg = "#f7f5f5", part = "all") %>%
bg(bg = "#D9D9D9", part = "header") %>%
color(color = "#000000", part = "all") %>%
bg(j=1,i=1,bg = "#FFFFCC", part = "body") %>%
bg(j=1,i=2,bg = "#DAEEF3", part = "body") %>%
bg(j=1,i=3,bg = "#DAEEF3", part = "body") %>%
bg(j=1,i=4,bg = "#B8CCE4", part = "body") %>%
bold(j=1, bold = TRUE, part = "body") %>%
bold(bold = TRUE, part = "header") %>% #<= 0.05
font(fontname = 'Arial', part = "all") %>%
padding(padding = 0,part = "all") %>%
fontsize(size = 12, part = "header") %>%
fontsize(size = 11, part = "body") %>%
fontsize(j=1, size = 12, part = "body") %>%
align(align = "center", part = "all") %>%
border(border = fp_border(color = "#000000") , part = "all") %>%
border_outer(border = fp_border(color = "#000000", style = "solid", width = 2) , part = "all") %>%
autofit() %>%
height_all(height = 0.5, part = "all") %>% hrule(rule = "exact", part = "all") %>%
htmltools_value()
return(op)
})
where is the error
- Ngôn ngữ chính
- R
- Star
- 196
- Fork
- 36
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của YuLab-SMU/MicrobiotaProcess
-
ggdiffclade-No documentation for ‘offspring.tbl_tree_item’ in specified packages and librariesĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
YuLab-SMU/MicrobiotaProcess#136 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
YuLab-SMU/MicrobiotaProcess#134 ·
-
Could the function mp_plot_alpha() display the statistical value of the non-parametric tests ?Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
YuLab-SMU/MicrobiotaProcess#133 ·
-
Bracken to MPSEĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
YuLab-SMU/MicrobiotaProcess#132 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
YuLab-SMU/MicrobiotaProcess#131 ·
Tất cả issue của YuLab-SMU/MicrobiotaProcess
Issue tương tự
-
Development of logger messagesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
epiverse-trace/epiparameter#526 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
eirini-zormpa/hpc-intro#30 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Temp-directory guard in schedule_diagnostics() never matches on macOS (/var vs /private/var)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
REditorSupport/languageserver#833 ·
Maintainer thường phản hồi trong vòng 1 ngày