Search found 18 matches

by lkchan
Tue Oct 08, 2024 1:23 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

Re: display values from dataframe into row data

FINALLY IT WORK :grinning: :grinning:

Thank you very much for your patience in guiding.

Terima Kasih banyak banyak (Malay language)
by lkchan
Mon Oct 07, 2024 8:23 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

Re: display values from dataframe into row data

Hi Sir

I finally solve the UA_values. I change the table to vertical and follow your advice to declare column in r.yaml.

deps_df <- data.frame(Value = character(), stringsAsFactors = FALSE)

for (item in self$options$dep){
deps_df <- rbind(deps_df, data.frame(Value = paste(item)))
}
combined ...
by lkchan
Wed Oct 02, 2024 7:11 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

Re: display values from dataframe into row data

Hi, After reading your comments, I relearnt the named dataframe and named list in R.
I name the column in the dataframe
combined_UA_df <- data.frame(
Item = df_name,
UaValue = UA_values_df
)
output of the combined_UA_df

Item UaValue
1 Q1 0
2 Q2 0
3 Q3 0
4 Q4 0

Here is the latest code
for ...
by lkchan
Tue Oct 01, 2024 2:17 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

Re: display values from dataframe into row data

hi Sir, I tried your suggestion. However it doesn't work. I tried to do it this way. It is not displayed too.
df_name <- self$options$dep
combined_UA_df <-rbind(df_name, UA_values_df)
combined_UA_df <- as.matrix(combined_UA_df)
self$results$text$setContent(combined_UA_df)

for (colNo in seq ...
by lkchan
Mon Sep 30, 2024 7:23 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

Re: display values from dataframe into row data

Hi

Regarding table, when the all values in dataframe is 0, why it is not display? so I created a dummy dataframe but it is not display.
# Define the number of rows and columns
num_rows <- 1
num_cols <- ncol(transformed_df)
# Create a DataFrame filled with 0.000
df <- data.frame(matrix(rep(0 ...
by lkchan
Thu Sep 26, 2024 2:40 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

Re: display values from dataframe into row data

Hi
Here is the proposed table
https://github.com/lerlerchan/cviJmv/blob/main/sampleData/proposal1.jpg
https://github.com/lerlerchan/cviJmv/blob/main/sampleData/proposal2.jpg
https://github.com/lerlerchan/cviJmv/blob/main/sampleData/proposal1.jpg
https://github.com/lerlerchan/cviJmv/blob/main ...
by lkchan
Wed Sep 25, 2024 7:38 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

Re: display values from dataframe into row data

hi after checking the structure of the dataframe. There is only 1 row withe many columns.
This code work.

for (colNo in seq_along(I_CVI_values_df)){
values <- as.list(I_CVI_values_df[colNo])
table1$setRow(rowNo = 2, values)
}
table1$setRow(rowNo = 2, list(var = paste("I-CVI")))


This code ...
by lkchan
Wed Sep 25, 2024 4:44 am
Forum: Module development
Topic: display values from dataframe into row data
Replies: 16
Views: 198900

display values from dataframe into row data

Hi

Is it possible to for loop the value from data frame into a table?

table1 <- self$results$scoreTable
for (name in self$options$dep){
table1$addColumn(name, title=name)
}

for(value in prpRev_df){
table1$setRow(rowNo=1, value=list(
var = "Experts in Agreement",
list = values ...
by lkchan
Wed Feb 21, 2024 7:14 am
Forum: Module development
Topic: how to display dataframe data in columns?
Replies: 13
Views: 83201

Re: how to display dataframe data in columns?

How do I name a row title?
table3 <- self$results$compTable
for (rowNom in seq_along(colMeansFuzzyScale)) {

values <- as.list(colMeansFuzzyScale[rowNom])
table3$setRow(rowNo=1, values)
}

I tried this but not sucess.
table1 <- self$results$scoreTable
for (rowNom in seq_len(nrow(df_combined ...