search for: transposed

Displaying 20 results from an estimated 731 matches for "transposed".

Did you mean: transpose
2010 Jul 30
4
transpose of complex matrices in R
Hello everybody When one is working with complex matrices, "transpose" very nearly always means *Hermitian* transpose, that is, A[i,j] <- Conj(A[j,i]). One often writes A^* for the Hermitian transpose. I have only once seen a "real-life" case where transposition does not occur simultaneously with complex conjugation. And I'm not 100% sure that that wasn't a
2006 Jul 27
2
Vector extracted from a matrix. How can I specify dimensions in as.matrix?
...sive analysis that uses every line (vector) of a matrix in a loop. In the model, I need to transpose those vectors that are extracted from a matrix. Using simple vectors (no matrix involved) the transpose function works fine: simplevector <-matrix(1:3,3,1) tsimplevector <-t(simplevector) #transposed dim(simplevector) #3x1 matrix (vector) dim(tsimplevector)#1x3 PROBLEM: However, when the vector is extracted from a matrix, its dimension is NULL. In this case the transposed dimension is correct, but you'll see the next example, that if a row was extracted, the dimension would be wrong: i...
2010 Dec 20
1
transposing panel data
...10 POLICE 101920 CKM 8840.4 31-Mar-10 POLICE 101920 CKM 8986.25 24-May-10 POLICE 101920 CKM 34252.2 30-Jun-10 POLICE 101920 CKM 8913.35 30-Apr-10  POLICE   Ideally i would like a row to have one row of  ACCT_NUM and TranAmount and Date be transposed to columns. Thanks Kind regards, Tabitha Mundia , Project Management Office, Equity Bank Limited,P.O. Box 75104-00200 Head Office, Upper hill, NHIF BLDG, 14th Floor, Nairobi, Kenya Direct Extension : +254732112721   Mobile: +254722309538...
2012 Mar 20
2
Reshaping data from long to wide without a "timevar"
Hello All, I was wondering if it's possible to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order. My data have a variable called "RowNo" that functions almost like a
2003 Sep 29
4
Data frame transpose
Hi All, I want to ask if there is a transpose function for data frame like the procedure of transpose in SAS? Because I want to partially transpose a data frame which contains 5 columns (siteid, date, time, obs, mod), what I want to do is to put time as the column variables along with siteid, and date, and put obs and mod in the row names. specifically to transpose a data frame: siteid date
2009 Jul 10
4
how to transpose a dataframe
I want to transpose a dataframe like level 2006 2007 2008 A .... B ..... C ........ into level year A 2006 A 2007 A 2008 B 2006 B 2007 ...... There is a procedure in SAS can do this, is there any function in R can do this? -- View this
2009 Sep 28
6
SAS user now converting to R - Help with Transpose
I am just starting to code in R and need some help as I am used to doing this in SAS. I have a dataset that looks like this: Chemical Well1 Well2 Well3 Well4 BOD 13.2 14.2 15.5 14.2 O2 7.8 2.6 3.5 2.4 TURB 10.2 14.6 18.5 17.3 and so on with more chemicals.... I would like to transpose my data so that it looks like this: Chemical WellID Value BOD Well1 13.2 BOD Well2 14.2 BOD Well3 15.5 BOD
2008 Apr 15
2
Transposing Data Frame does not return numeric entries
...ot; 0" "0" ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:193] "X" "upwd1201" "upwd0502" "upwd0702" ... ..$ : NULL x is a data frame with a whole bunch of numeric vectors I would like for the rows and columns to be reversed == transposed but with the same attributes. I am trying to feed the transposed data frame to metaMDS(vegan). I am stumped- sorry for the large attached file- I am at a loss. Stephen Sefick -- Let's not spend our time and resources thinking about things that are so little or so large that all they really...
2005 Mar 03
2
reading row vectors from file
Hi, New to R, using version 2.0.1 (2004-11-15) on debian Linux (sid), kernel 2.6.8-2-686. I have data in files with separate vectors on each row of the file, e.g., $ cat /tmp/stats freq,0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,... noise,49,47,48,48,50,47,48,47,46,50,48,54,49,47,49,... signal,99,0,100,0,0,100,0,100,100,0,100,101,100,0,0,... pctrcv,5,0,5,0,0,5,0,5,11,0,5,5,5,0,0,...
2010 Dec 20
2
package "arules" - 'transpose' of the transactions
Suppose this is my list of transactions: set.seed(200) tran=random.transactions(100,3) inspect(tran) items transactionID 1 {item80} trans1 2 {item8, item20} trans2 3 {item28} trans3 I want to get the 'transpose' of the data, i.e. transactionID items 1 {trans2} item8 2 {trans2} item20 3 {trans3} item28 4 {trans1} item80 I
2024 Feb 29
2
[External] converting MATLAB -> R | element-wise operation
I decided to do a direct comparison of transpose and sweep. library(microbenchmark) NN <- matrix(c(1, 2, 3, 4, 5, 6), nrow = 2, byrow = TRUE) # Example matrix lambda <- c(2, 3, 4) # Example vector colNN <- t(NN) microbenchmark( sweep = sweep(NN, 2, lambda, "/"), transpose = t(t(NN)/lambda), colNN = colNN/lambda ) Unit: nanoseconds expr min lq
2010 Jun 29
2
transposing a data frame from horizontal to vertical (stacking)
...k you very much! MyData<-data.frame(names=c("John","Mary","Paul","Debby"),jan=c(10,15,20,25),feb=c(1,2,3,4)) (MyData) months<-names(MyData)[-1] people<-as.character(MyData[[1]]) ### Creating a temp matrix with people as columns and months as rows: transposed<-apply(MyData[-1],1,t) ### Putting vertical data (months as rows) - for each person - into a list: list.of.stacked<-list() for(i in 1:ncol(transposed)){ list.of.stacked[[i]]<-as.data.frame(matrix(ncol=3,nrow=length(months))) names(list.of.stacked[[i]])<-c("month","valu...
2009 Sep 27
3
Teach me how to transpose in R
Hi guys, I need your help!! My goal is to make a csv file from ncdf file. This is the code i've used : > hyo=open.ncdf("C:/CRUTEM3.nc") > hyo [1] "file C:/CRUTEM3.nc has 4 dimensions:" [1] "longitude Size: 72" [1] "latitude Size: 36" [1] "unspecified Size: 1" [1] "t Size: 1916" [1] "------------------------"
2011 Jul 25
1
Ouch - brown, hansen error
Hi I'm trying to use ouch's hansen and brown functions but I get the error: > brown(logflatnodes,archotreeouch) Error in backsolve(l, x, k = k, upper.tri = upper.tri, transpose = transpose) : NA/NaN/Inf in foreign function call (arg 1) and with hansen also: Error in optim(par = c(sqrt.alpha, sigma), fn = function(par) { : function cannot be evaluated at initial parameters
2009 Feb 24
2
Transpose array
Hi Listers, Is there a way that I can transpose an array... Suppose I have the following array... x<-array(c(1,2,3,4),dim=c(1,2,2)) , , 1 [,1] [,2] [1,] 1 2 , , 2 [,1] [,2] [1,] 3 4 And I would like to get the following result... , , 1 [,1] [1,] 1 [,2] 2 , , 2 [,1] [,2] [1,] 3 [,2] 4 Thanks in advance, Marcio -- View this message in context:
2009 Aug 18
4
Transpose a dataset
Hi Everyone, I have a dataset like this mean sd 0% 25% 50% 75% 100% n BODY TEMPERATURE 36.41099 0.4015699 35.1 36.22222 36.5 36.66667 37.1 89 DIASTOLIC BLOOD PRESSURE 73.60079 9.4656186 50.0 67.00000 73.0 80.00000 95.0 253 HEIGHT 171.94000 9.2011670 153.5 166.50000 173.0 176.25000 190.0
2009 May 15
2
transposing/rotating XY in a 3D array
...by: array(x, c(2,3,2)) because breaks the structure (e.g. 1,3,5 is type mismatch) array(1:12,c(2,3,2)) , , 1 [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 ... Of course following R's indexing order (rowIndex is the fastest) retains the structures, but X and Y dimensions are transposed. (note, c (2,3,2) => (3,2,2)) array(1:12, c(3,2,2)) , , 1 [,1] [,2] [1,] 1 4 [2,] 2 5 [3,] 3 6 Its like converting into Japanese vertical reading. It is not that I cannot get used to it, but I guess it is less error prone if I have the same order as in the data files....
2008 Aug 25
3
Maintaining repeated ID numbers when transposing with reshape
I have a dataset in "long" format that looks something like this: ID TEST RESULT 1 A 17 1 A 12 1 B 15 1 C 12 2 B 8 2 B 9 Now what I would like to do is transpose it like so: ID TEST A TEST B TEST C 1 17 15 12 1 12 . . 2
2000 Nov 07
1
matrix transpose and object name
hello, everybody, i have several unresolved issues: 1. how to do a matrix transpose? i cant find how to do it in the documentation. 2..suppose i have an object named as lm1 from linear regression, how could i refer to it by paste("lm",1,sep="") ? 3. to save a matrix 100 x 30, how to have a text file with 100 lines and 30 cols, instead of stacking them? thanks. best regards
2006 May 09
1
transposing a big data file
I HAVE A VERY BIG DATA OF 67 COLMS AND 25000 ROWS AND WOULD LIKE TO TRANSPOSE IT THE R HELP WAS NOT ENOUGH INFORMATION BECOUSE I AM NOT A PROGRAMMER AND FIRST TIME R USER. SO CAN YOU GIVE SOME HINTS OF CODING, AA TT GG GG CC AA TT GG GG CC AA TT GG GG CC AA TT GG GG CC AA TT GG GG CC TO AA AA AA AA AA TT TT TT TT TT GG GG GG GG GG GG GG GG GG GG CC CC CC CC CC [[alternative HTML