Main Content

Tablas

Arreglos en formato tabular cuyas columnas designadas pueden tener diferentes tipos de datos.

Una table (tabla) es un tipo de dato adecuado para datos orientados a columnas o datos tabulares que suelen almacenarse como columnas en un archivo de texto o en una hoja de cálculo. Las tablas constan de filas y variables orientadas a columnas. Cada variable en una tabla puede tener un tipo de datos y un tamaño diferente, con la única restricción de que cada variable debe tener la misma cantidad de filas. Para obtener más información, consulte Crear tablas y asignarles datos o vea Tablas y arreglos categóricos.

Funciones

expandir todo

tableTable array with named variables that can contain different types
array2tableConvertir un arreglo homogéneo en una tabla
cell2tableConvert cell array to table
struct2tableConvert structure array to table
table2arrayConvertir una tabla en un arreglo homogéneo
table2cellConvertir una tabla en un arreglo de celdas
table2structConvert table to structure array
table2timetableConvert table to timetable
timetable2tableConvert timetable to table
vartypeSubscript into table or timetable by variable type
convertvarsConvert table or timetable variables to specified data type

Importación y exportación básicas

readtableCreate table from file
writetableWrite table to file

Definir reglas de importación

detectImportOptionsCreate import options based on file content
spreadsheetImportOptionsImport options object for Spreadsheets
getvaroptsGet variable import options
setvaroptsSet variable import options
setvartypeSet variable data types
previewPreview eight rows from file using import options

Archivos Parquet

parquetreadRead columnar data from a Parquet file (desde R2019a)
parquetwriteWrite columnar data to Parquet file (desde R2019a)
parquetinfoGet information about Parquet file (desde R2019a)
summaryPrint summary of table, timetable, or categorical array
heightNúmero de filas de una tabla
widthNumber of table variables
istableDetermine if input is table
istabularDetermine if input is table or timetable (desde R2021b)
headGet top rows of array or table
tailGet bottom rows of array or table
stackedplotStacked plot of several variables with common x-axis

Ordenar

sortrowsSort rows of matrix or table
uniqueValores únicos en un arreglo
issortedrowsDetermine if matrix or table rows are sorted
topkrowsTop rows in sorted order

Filtrar filas y variables

rowfilterSelectively import rows of interest (desde R2022a)
vartypeSubscript into table or timetable by variable type

Reorganizar variables

addvarsAdd variables to table or timetable
renamevarsRename variables in table or timetable (desde R2020a)
movevarsMove variables in table or timetable
removevarsDelete variables from table or timetable
splitvarsSplit multicolumn variables in table or timetable
mergevarsCombine table or timetable variables into multicolumn variable
convertvarsConvert table or timetable variables to specified data type

Remodelar

rows2varsReorient table or timetable so that rows become variables
stackStack data from input table or timetable into one variable in output table or timetable
unstackUnstack data from single variable into multiple variables
inner2outerInvert nested table-in-table hierarchy in tables or timetables

Personalizar propiedades

addpropAdd custom properties to table or timetable
rmpropRemove custom properties from table or timetable

Combinar usando variables clave

joinCombine two tables or timetables by rows using key variables
innerjoinInner join between two tables or timetables
outerjoinOuter join between two tables or timetables

Operaciones con conjuntos

unionSet union of two arrays
intersectSet intersection of two arrays
ismemberArray elements that are members of set array
setdiffSet difference of two arrays
setxorSet exclusive OR of two arrays
anymissingDetermine if any array element is missing (desde R2022a)
ismissingFind missing values
standardizeMissingInsert standard missing values
rmmissingRemove missing entries
fillmissingFill missing entries
pivotSummarize tabular data in pivoted table (desde R2023a)
groupcountsNumber of group elements (desde R2019a)
groupfilterFilter by group (desde R2019b)
groupsummaryGroup summary computations
grouptransformTransform by group
findgroupsFind groups and return group numbers
splitapplySplit data into groups and apply function
rowfunApply function to table or timetable rows
varfunApply function to table or timetable variables
vartypeSubscript into table or timetable by variable type
convertvarsConvert table or timetable variables to specified data type

Apps

Data CleanerPreprocess and organize column-oriented data (desde R2022a)

Tareas de Live Editor

Compute by GroupSummarize, transform, or filter by group in the Live Editor (desde R2021b)
Pivot TableSummarize tabular data in pivoted table in the Live Editor (desde R2023b)
Join TablesCombine two tables using key variables in the Live Editor (desde R2019b)
Stack Table VariablesCombine values from multiple table variables into one table variable in the Live Editor (desde R2020a)
Unstack Table VariablesDistribute values from one table variable to multiple table variables in the Live Editor (desde R2020a)

Temas