groupedData
Convert groupedData object to table
tbl = groupedData2table(grpData)
example
tbl = groupedData2table(grpData) converts a groupedData object grpData to a table.
tbl
grpData
collapse all
Load the sample data set.
load pheno.mat ds
Create a groupedData object from the data set ds.
ds
grpData = groupedData(ds);
Display the object properties.
grpData.Properties
ans = struct with fields: Description: '' UserData: [] DimensionNames: {'Observations' 'Variables'} VariableNames: {'ID' 'TIME' 'DOSE' 'WEIGHT' 'APGAR' 'CONC'} VariableDescriptions: {} VariableUnits: {} VariableContinuity: [] RowNames: {} CustomProperties: [1x1 matlab.tabular.CustomProperties] GroupVariableName: 'ID' IndependentVariableName: 'TIME'
GroupVariableName and IndpendentVariableName have been automatically assigned to 'ID' and 'Time', respectively.
GroupVariableName
IndpendentVariableName
Convert the groupedData to a table.
tbl = groupedData2table(grpData);
Display the first 5 rows of the table.
tbl(1:5,:)
ans=5×6 table ID TIME DOSE WEIGHT APGAR CONC __ ____ ____ ______ _____ ____ 1 0 25 1.4 7 NaN 1 2 NaN 1.4 7 17.3 1 12.5 3.5 1.4 7 NaN 1 24.5 3.5 1.4 7 NaN 1 37 3.5 1.4 7 NaN
Grouped data, specified as a groupedData object.
Data table, returned as a table.
table
groupedData | sbiofit | sbiofitmixed | table
sbiofit
sbiofitmixed
You have a modified version of this example. Do you want to open this example with your edits?