how to display dataframe data in columns?

Everything related to the development of modules in jamovi
lkchan
Posts: 9
Joined: Mon Dec 04, 2023 1:08 am

Re: how to display dataframe data in columns?

Post by lkchan »

Thank you sir
sure, please feel free to add me in Slack group. Plan to develop other modules too.

PS: I am crying and touched because you solved the issue. Thank you so much.
User avatar
jonathon
Posts: 2627
Joined: Fri Jan 27, 2017 10:04 am

Re: how to display dataframe data in columns?

Post by jonathon »

no worries ikchan, you should have received a slack invitation.

cheers
lkchan
Posts: 9
Joined: Mon Dec 04, 2023 1:08 am

Re: how to display dataframe data in columns?

Post by lkchan »

How do I name a row title?

Code: Select all

  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.

Code: Select all

table1 <- self$results$scoreTable
              for (rowNom in seq_len(nrow(df_combined))) {
                if (rowNom > table1$rowCount)
                  break()
                values <- as.list(df_combined[rowNom,])
                table1$setRow(rowNo = rowNom, values = list(
                  var = rowNom, 
                  values))
              }
           table1$setRow(rowKey=21, var="Item rank")
User avatar
jonathon
Posts: 2627
Joined: Fri Jan 27, 2017 10:04 am

Re: how to display dataframe data in columns?

Post by jonathon »

$setRow() takes a named list of values

table1$setRow(rowKey=21, list(var="Item rank"))

jonathon
Post Reply