Questions tagged [transpose]

Transposition is an operation that applies to matrices wherein the rows and columns are swapped

The transpose of a matrix A is written as A'. The transpose of matrix A is another matrix B in which the element in the ith row and the jth column of A is in the jth row and the ith column of B. For example:

Suppose A =

[[11, 12, 13],
 [21, 22, 23],
 [31, 32, 33]]

Then, A' =

[[11, 21, 31],
 [12, 22, 32],
 [13, 23, 33]]

In scientific software for statistical computing and graphics, function t transposes a matrix.

3257 questions
1
vote
2 answers

PROC Trasnpose/query builder in SAS Enterprise Guide

After I run Transpose in query builder, i get '.' for empty fields. Is there a way to avoid these '.' ? I can remove those in the next step by adding a case statement but doing this for more than 100 columns won't be a good idea. 123019 1 . . …
learnlearn10
  • 169
  • 1
  • 3
  • 15
1
vote
2 answers

Can Someone Help Me Troubleshoot This Program (It Transposes A Matrix Using Pointers)

I have this program that I made that is supposed to transpose a matrix, no matter what size it is. It however is not working like it is supposed to and I have no idea why, I do get output from it there are no compiling errors but the output for…
user59646
  • 11
  • 1
1
vote
1 answer

Crystal Reports / concatenating rows based on change in repeated field value

I have been pulling my hair out on this one. I'm not very adept at coding formulas. I have a two column database that looks like this: USERID1 1/1/2000 USERID1 2/1/2000 USERID1 3/3/2001 USERID2 1/5/2000 USERID2 2/7/2001 USERID2 …
1
vote
4 answers

How to remove Warning from SAS log?

i am getting a log warning stating WARNING: 21 observations omitted due to missing ID values i was transposing the dataset using this code: PROC TRANSPOSE DATA= PT OUT= PT; BY SOC_NM PT_NM; ID TREATMENT; VAR COUNT; RUN; i want to remove…
ved_null_
  • 71
  • 2
  • 10
1
vote
2 answers

PHP merge multiple arrays in order of their value index

I've found a lot of information on joining arrays together using array_merge, but I'm wondering how easy it is to merge multiple arrays in order of their value index, rather than simply joining them together. For example, if we had the following…
James Mathieson
  • 419
  • 2
  • 5
  • 22
1
vote
1 answer

How to transpose data in powershell

I have a file that looks like this: a,1 b,2 c,3 a,4 b,5 c,6 (...repeat 1,000s of lines) How can I transpose it into this? a,b,c 1,2,3 4,5,6 Thanks
fenster
  • 1,809
  • 6
  • 22
  • 24
1
vote
1 answer

transpose a subset columns in dataframe (not groupby, need to create new columns)

I've a table which has two columns, the first one is the indice of the site, and the second is the number of states per hour during 24 hours. Thus for each site, I've 24(lines)x2(columns) data. How can I transpose the second column (24 lines data…
perigee
  • 9,438
  • 11
  • 31
  • 35
1
vote
0 answers

Flatten table with large number of columns

I have a transactional table with 100+ columns and each row is uniquely identified by an id column. For a data export requirement, we need to make export the table flat - aka, id/column_name/column_value format. Using PIVOT will work here. However,…
sabyasm
  • 56
  • 3
1
vote
2 answers

Isabelle: proof for a equality of transposed matrix with a constant factor

I am facing problems with the following lemma, which I think should be correct. I can get the proof to work up to a certain point with small steps, however I haven't found a way to proof the entire lemma. lemma abc: fixes A ::…
mrsteve
  • 4,082
  • 1
  • 26
  • 63
1
vote
0 answers

transpose same single column range from multiple worksheets onto single worksheet

I have an indefinite number of multiple worksheets from which I am trying to transpose a single column range (i.e., "C4" on down) from each onto a single summary worksheet. The column range is the same for all worksheets. The code I've adapted…
Calo
  • 11
  • 2
1
vote
3 answers

Is there an efficient way of transposing huge table in SAS

I have a data set in SAS that I need to transpose. It has the form id date type value and I need to convert it into id date valueoftype1 valueoftype2 ... Is there any efficient way of accomplishing this? My data is huuuge. For example; data one;…
zaldir
  • 19
  • 3
1
vote
2 answers

Grab All Rows in ONE Column from One SQL Statement

I'm looking for a way, either via SQL or PHP, to return many columns from an SQL statement but be able to iterate through them one column at a time. I have a query which gives me for example: ID | N1 | N2 1 | 15 | 20 2 | 25 | 30 3 | 35 | 40 I…
StuckAtWork
  • 1,613
  • 7
  • 23
  • 37
1
vote
2 answers

Best way to transpose a grid of data in a file

I have large data files of values on a 2D grid. They are organized such that subsequent rows of data in the grid are subsequent lines in the file. Each column is separated by a tab character. Essentially, this is a CSV file, but with tabs instead of…
Victor Liu
  • 3,545
  • 2
  • 24
  • 37
1
vote
2 answers

Issue with returning a 2 dimensional array

I was asked to write a program that gets a two dimensional array (a matrix), number of columns,and number of rows, and the program will return the transpose matrix (without using a [][], meaning only using pointer arithmetics) The program I wrote,…
Oria Gruber
  • 1,513
  • 2
  • 22
  • 44
1
vote
2 answers

Mathematical transpose in excel

Good day everybody! I'm currently trying to figure something out in excel before implementing in it VBScript. I have to mathematically transpose a few cells (10*10 or 5r*10c) in a matrice: ------------------------------- | .. | .. | .. | .. | .. |…
van Nijnatten
  • 404
  • 5
  • 15