Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Transposing Matrices | Section
Organizing Complex Data Structures
Sectie 1. Hoofdstuk 3
single

single

bookTransposing Matrices

Veeg om het menu te tonen

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.

Taak

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.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 3
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

some-alt