How can I write ANOVA results to a csv file?

조회 수: 24 (최근 30일)
Dustin
Dustin 2022년 11월 21일
댓글: Dustin 2022년 11월 21일
I want to write results from an ANOVA to a csv file, but writetable() gives me this error.
Unrecognized field name "internal.stats.DoubleTableColumnReal".
I am using the example from the ranova() documentation
load fisheriris
t = table(species,meas(:,1),meas(:,2),meas(:,3),meas(:,4),...
'VariableNames',{'species','meas1','meas2','meas3','meas4'});
Meas = table([1 2 3 4]','VariableNames',{'Measurements'});
rm = fitrm(t,'meas1-meas4~species','WithinDesign',Meas);
ranovatbl = ranova(rm)
writetable(ranovatbl,'test_table.txt')

채택된 답변

cr
cr 2022년 11월 21일
편집: cr 2022년 11월 21일
Don't understand whats causing the problem, but the below line works
writetable(ranovatbl(1:end,:),'test_table.txt')
Really strange. Looking forward to an explanation from experts/staff if this is a bug.
  댓글 수: 1
Dustin
Dustin 2022년 11월 21일
Thanks, yeah this works, weird that it's required though.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by