Hi
I'd like a result table to appear only when some specific results are present. The example is as follows:
in mymodule.r.yaml I have this table definition
   - name: cov
    title: Random Parameters correlations
    type: Table
    visible: (showRandomCov)
the value of the variable "showRandomCov" can only be computed after the results are computed. Can I condition its visibility to some result value?
p.s. I've tried to compute showRandomCov in the mymodule.b.R but I get the error "Could not resolve "showRandomCov"
						
									
						
										
							table visibility
Re: table visibility
Hi,
You cannot make the visibility of a table dependent on your results using only the YAML. However, you can do this in the analysis file (.b.R). To do this you first have to set the visibility of your table object to false in the .r.yaml like this:
This will hide your table by default. Next you can add a statement in your .b.R file to set visible to true if a certain condition is met. For example like this:
Now, it will hide your table unless the condition is met.
						
									
						
										
							You cannot make the visibility of a table dependent on your results using only the YAML. However, you can do this in the analysis file (.b.R). To do this you first have to set the visibility of your table object to false in the .r.yaml like this:
Code: Select all
    - name: cov
      title: Random Parameters correlations
      type: Table
      visible: false
Code: Select all
if (condition == TRUE) {
    table <- self$results$cov
    table$setVisible(TRUE)
}
- mcfanda@gmail.com
- Posts: 574
- Joined: Thu Mar 23, 2017 9:24 pm
Re: table visibility
great, thanks
						
									
						
										
							
