Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Transposing Matrices | Section
Organizing Complex Data Structures
Sección 1. Capítulo 3
single

single

bookTransposing Matrices

Desliza para mostrar el menú

Transposition is the operation of swapping the rows and columns of a matrix. In R, this is done with the t() function.

Example

123456
# Initial matrix m <- matrix(1:6, nrow = 2) m # Transposed matrix t(m)
copy

The original matrix has 2 rows and 3 columns. After transposition, it becomes 3 rows and 2 columns.

Tarea

Swipe to start coding

You have a vector num. Your goal is to:

  1. Build a matrix from num and assign it to the m variable.
  2. Output the transposed m matrix.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 3
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

some-alt