APSIMInitiative / ApsimX

ApsimX is the next generation of APSIM
http://www.apsim.info
Other
132 stars 161 forks source link

One-level factors are not shown in reports #3273

Closed BrianCollinss closed 5 years ago

BrianCollinss commented 5 years ago

I noticed that when a factor has just one level, it does not appear in the reports. For example, when the factor 'Cv' (i.e. cultivar) has only one level (e.g. Hartog), 'Cv' does not appear in the output tables.

I understand that this is not a factor anymore. But one (like me!) may start preparing an APSIM file or R scripts with just one level included (to make initial tests faster) and expect the scripts to work regardless of the changes in the number of factor levels. However, when only one level exists in a factor, R scripts which are dependant on the name of that factor would not work.

hol430 commented 5 years ago

I noticed that when a factor has just one level, it does not appear in the reports.

What exactly do you mean by in the reports? Do you mean the table in the experiment node doesn't display the correct information?

If this is still an issue, can you upload an .apsimx file which demonstrates the issue?

BrianCollinss commented 5 years ago

This is an old issue maybe it is already fixed by your recent changes. Back then, the report tables did not show the column of factor names when I only had one level in a factor.

hol430 commented 5 years ago

This appears to be fixed now.