0 Daumen
297 Aufrufe

D2E80467-EAC4-4FB1-9241-106160546874.jpeg Aufgabe:

Avatar von

Was ist das für eine Sprache, und was ist Deine Frage?

Auszug aus "help(cbind)":

For cbind (rbind) the column (row) names are taken from the colnames (rownames) of the arguments if these are matrix-like. Otherwise from the names of the arguments or where those are not supplied and deparse.level > 0, by deparsing the expressions given, for deparse.level = 1 only if that gives a sensible name (a ‘symbol’, see is.symbol).

For cbind row names are taken from the first argument with appropriate names: rownames for a matrix, or names for a vector of length the number of rows of the result.

For rbind column names are taken from the first argument with appropriate names: colnames for a matrix, or names for a vector of length the number of columns of the result.

1 Antwort

0 Daumen
 
Beste Antwort
Statistik: cbind und median. Mit rbind kenne ich mich aus, aber das kann ich noch nicht.

Statt
h<-cbind(9:13,c(2,2,1,1,2))
h[4,1]+median(h[,2])

kannst du auch
h<-rbind(9:13,c(2,2,1,1,2))
h[1,4]+median(h[2,])

verwenden; es kommt das gleiche heraus.

Avatar von 26 k

Danke! Jetzt habe ich es verstanden!

Gut. Auf einer R-Console könnte das zum Beispiel so aussehen:

blob.png

Falls du keine hast, kannst du den Code auf https://rdrr.io/snippets/ auch online ausprobieren.

Super! Danke!

Ein anderes Problem?

Stell deine Frage

Willkommen bei der Mathelounge! Stell deine Frage einfach und kostenlos

x
Made by a lovely community