transpose

Using Vlookup/Macros to Transpose

天大地大妈咪最大 提交于 2019-12-13 06:13:18
问题 In Excel, I have a unique listing of people and their various roles that they hold in separate columns within each row as following: Name Role Role Role Role Role John A B C null null Jane D C null null null Lisa A B C F G I want to transpose all the roles for each unique 'Name' so that there is a row for each combination of Name - Role as follows: Name Role John A John B John C Jane D Jane C Lisa A Lisa B Lisa C Lisa F Lisa G Is there any combination of functions or macros I can utilize to

Rapidminer data transpose equivalent to melt in R

不问归期 提交于 2019-12-13 05:24:14
问题 I have a Rapidminer process which reads from a web API, uses Read XML to process the response and XPATH to capture one of the elements in the XML. The elements can be of any number and the resulting attribute is a concatenated string of the element/text(). As a result of the concatenated string, I have to split the string into multiple columns like this: ID Col1 Col2 Col3 Col4 Col5 Col6 A 1 5 7 8 B 2 C 4 D 3 9 10 11 12 13 My final goal is to transpose it into the following format: ID NewCol A

Reading horizontal (row-based) data from xlsx files into R data frames

我的梦境 提交于 2019-12-13 02:26:58
问题 This is a "let's try another way" post that is related to this one: Is it possible to define/modify a reading function that can handle the fact that data stored in an xlsx file is row-based (i.e. each row represents a variable) and transforms it accordingly so it can be stored in a column-based data.frame (i.e. what used to be a row in xlsx becomes a column ) while capturing the underlying class/data type of the row-based variables ? Regarding csv files I would probably start with turning to

Transposing matrix / Trouble understanding how bsxfun works

对着背影说爱祢 提交于 2019-12-12 21:22:05
问题 This could be a weird question because Many would be wondering why to use such a complicated function like bsxfun for transposing while you have the .' operator. But, transposing isn't a problem for me. I frame my own questions and try to solve using specific functions so that i learn how the function actually works. I tried solving some examples using bsxfun and have succeeded in getting desired results. But my thought, that i have understood how this function works, changed when i tried

Excel VBA Transpose Variable Column Range to Variable Rows

元气小坏坏 提交于 2019-12-12 19:33:40
问题 Hello StackOverFlow Community, I started working with excel vba not too long ago and could really use some help with a somewhat complex problem. I have a spreadsheet with a column of "Prime" parts and its "Alternative" Parts below it. I need to create a macro that will transpose the Variable Alternative parts to the right of its associated Prime part. So for the Example below, in Column A "P" are Prime Parts and "A" are Altenates : A | 1P | 1A | 1A | 1A | 2P | 2A | 2A | 3P | 3A | I trying to

Transposing a matrix in C++

好久不见. 提交于 2019-12-12 13:23:07
问题 I'm writing a program to transpose a given matrix using allocated memory. The function works perfect with square matrix NxN (rows==cols) but it crashes with MxN matrix (rows != cols). Please help void transpose(int **matrix, int *row, int *col) { // dynamically allocate an array int **result; result = new int *[*col]; //creates a new array of pointers to int objects // check for error if (result == NULL) { cout << "Error allocating array"; exit(1); } for (int count = 0; count < *col; count++)

Taking the “transpose” of a table using SQL

ぐ巨炮叔叔 提交于 2019-12-12 12:26:36
问题 I don't know if there is a name for this operation but it's similar to the transpose in linear algebra. Is there a way to turn an 1 by n table T1 such as c_1|c_2|c_3|...|a_n ------------------- 1 |2 |3 |...|n Into a n by 2 table like the following key|val ------- c_1|1 b_2|2 c_3|3 . |. . |. a_n|n I am assuming that each column c_i in T1 can be unlikely identified. 回答1: Basically, you need to UNPIVOT this data, you can perform this using a UNION ALL : select 'c_1' col, c_1 value from yourtable

How to transpose or pivot data of a text file in unix?

狂风中的少年 提交于 2019-12-12 07:02:13
问题 I have an input text file in unix with this kind of data. Event_date:20190512044638 Error_code:5858 Event_type:GPRS data Duration:772 Missing_provider_id:46009 Event_date:20190512044638 Error_code:780678 Event_date:20190512064535 Error_code:5858 Event_type:GPRS data Duration:2172 Missing_provider_id:722310 i want this data to be in this output format: Event_date Error_code Event_type Duration Missing_provider_id 20190512044638 5858 GPRS data 772 46009 20190512044638 780678 20190512064535 5858

sql selectL rows to colums without subquery

蹲街弑〆低调 提交于 2019-12-12 05:14:25
问题 I have a table in Oracle 10g that contains some information as follows: SQL> select * from t_test; INFO CODIGO GRUPO ---------- ---------- ---------- 101 190 VTOS 100 130 VTOS 102 140 VTOS I'd like to extract all the rows that have GRUPO='VTOS' and transpose those rows to columns. The values in CODIGO are predetermined(I know which values can be stored in that column), so would like to get something like this: INFO_190 INFO_130 INFO_140 -------- -------- -------- 101 100 102 I know I can do

R error message when using t()%*% “requires numeric/complex matrix/vector arguments”

孤街浪徒 提交于 2019-12-12 04:46:39
问题 I am working on a social network analysis assignment where I need to create a network from a matrix. I’m trying to create a matrix which shows what students are linked by classes they have in common, or not (a person-person matrix). I have wrangled the original data into the first iteration of a matrix and now want to multiply the matrix. My dataset and current matrix is a bigger version of the below: names <- c("Tom", "Dick", "And", "Harry") class <- c("cs1", "cs2", "cs3", "cs1") count <- c