Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Transposing Matrices | Section
Practice
Projects
Quizzes & Challenges
Questionários
Challenges
/
Essential R Programming for Absolute Beginners - 1768563985826

bookTransposing Matrices

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.

Tarefa

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.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 29
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookTransposing Matrices

Deslize para mostrar o menu

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.

Tarefa

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.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 29
single

single

some-alt