similar to: Transposing Data Frame does not return numeric entries

Displaying 20 results from an estimated 300 matches similar to: "Transposing Data Frame does not return numeric entries"

2008 Sep 25
1
Splitting row names up and then adding up the columns associated with criteria from the parts of the site coding (help)
d <- c("upwd1201", "upwd0502", "upwd0702", "upwd1002", "upwd1102", "upwd0203", "upwd0503", "upwd0803", "upwd0104", "upwd0704", "upwd0804", "upwd1204", "upwd0805", "upwd1005", "upwd0106", "dnwd1201", "dnwd0502",
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
2012 Apr 30
2
Matrix transposition
Hi everyone. I want to transpose a data frame. Lets say the following DF: df = data.frame(matrix(ncol=4, nrow = 10)) df[,1] = c(rep(1,5),rep(2,5)) df[,2] = c(rep('a',4),rep('b',3),rep('c',3)) df[,3] = c(letters[5:14]) df[,4] = runif(10) I would like to form a data frame with each line corresponding to colon X1 and create a variable with columns X2 and X3. This would
2003 Jun 12
9
Programcode and data in the same textfile
I have the following problem. It is not of earthshaking importance, but still I have spent a considerable amount of time thinking about it. PROBLEM: Is there any way I can have a single textfile that contains both a) data b) programcode The program should act on the data, if the textfile is source()'ed into R. BOUNDARY CONDITION: I want the data written in the textfile in exactly
2011 Feb 07
1
Unusual slowing of R matrix multiplication version 2.12.1 (2010-10-15) vs 2.12.0
R Version 2.12.1 (2010-10-15) vs 2.12.0 has slowed down 8 fold for dual core and 17 fold for dual-core-dual-processor Macs. I have checked this result on 3 different macs using the following R-script: Using Version 2.12.0 on a dual core dual processor Mac: > source("http://www.bio.umass.edu/biology/kunkel/pub/R/CuriousResult.R") matrix multiplication 43.543 1.308 14.788
2006 Apr 04
1
imaging and contouring
Dear R'Helpers and Colleagues, I have looked in the documentation, asked to some colleagues in the lab, but was unable to solve the following difficulty. I am running R on a iMac G5 with OS 10.4. The file below (73 rows x 144 col) shows the values of a climatic index on the globe with a grid of 2,5 ? x 2,5 ? (NA = no value): ? With image() and map() and running the following
2001 May 30
3
Transformation of dissimilarity or distance matrix
Dear List, is there an elegant (or even not elegant) way how to transform dissimilarity or distance matrix A (or, in general, arbitrary symmetrical matrix) by transposition of rows and columns into a form closest to "block diagonal" matrix B? The matrix A is adjusted the following way A[A<epsilon] <-0 #(epsilon is given "small" number) B: (in its ideal form)
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
2007 Jun 25
2
transposing data.frames
Hello, This must be simple... Thanks a lot - Christoph # Imagine you have a list, e.g: K <- list(1:10, 2:11, 9:18) K # Transforming to dataframe... KK <- as.data.frame(K) # ... one obtaines the list elements as column. KK # But I need the list elements as rows # How can I achieve this? Is there a simple way to transpose data.frames?
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
2010 Dec 20
1
transposing panel data
I am currently trying to transpose some large panel data set ie transposing multiple rows in into a single column. instead the transpose functionality transposes all rows into columns. my sample data set looks like below: ACCT_NUM ACCOUNT_NAME TRAN_AMT DATE EMPLOYER 101913 GK 7489 30-Apr-10 PENSION 101913 GK 7489 30-May-10 PENSION 101913
2010 Oct 29
1
transposing a column table
Dear R-user, I need help on how to transpose this column of clustering vector in R with 8768 entries derived from a PAM clustering output in a vertical  view to an excel file   Clustering vector:    [1] 1 1 2 2 1 2 1 2 1 1 2 2 1 2 2 2 2 1 1 1 1 2 2 1 2 2 1 2 2 2 2 2 2 2 2 1 2   [38] 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 1 2 2 1 2 2 2 2 2 2 1 2 1 2 2 2 1 1 2 2   [75] 2 1 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 2
2012 Mar 17
2
Reading then transposing from file
Hi, I'm an R beginner and I'm struggling with what should be a rudimentary task. My data is along these lines: ID name1 name2 name3 name4 Class 0 1 0 2 Var1 A B C A Var2 B C C A Var3 C A B A etc. I'm using the following: foo <- data.frame(t(read.table("file", header=FALSE))) but of course now it's not using ID, Class, etc. as column names. As you can imagine,
2008 Feb 14
3
Transposing by a group variable
Hi R, Can I transpose a data frame by a particular group variable? For example: d=data.frame(group=c(1,1,2,2,2),val=c(6,4,6,3,5)) And my output should be: data.frame(group=c(1,2),v1=c(6,6),v2=c(4,3),v3=c(NA,5)) Many thanks, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2009 Apr 23
2
transposing a matrix - row by row?
Hello, I have a matrix that is a product of tapply on a larger data set. Let's assume it looks like this: X<-matrix(c(10,20,30,40,50,60),2,3) dimnames(X)<-list(c("1","2"),c("1","2","3")) (X) 1 2 3 1 10 30 50 2 20 40 60 Is there an efficient way of transforming this matrix into the following matrix: rows columns entries 1
2009 May 15
2
transposing/rotating XY in a 3D array
Dear list, We have a number of files containing similarly structured data: file1: A B C 1 2 3 4 5 6 file2: A B C 7 8 9 10 11 12 ... etc My part of R receives all these data as an array: 1,2,3... 12 together with info about dimensions (row,col,fileN) . ( Converting the data into 3D cannot simply done by: array(x, c(2,3,2)) because breaks the structure (e.g. 1,3,5 is type mismatch)
2010 Jun 29
2
transposing a data frame from horizontal to vertical (stacking)
Hello, everyone! I have a very simple task - I have a data frame (see MyData below) and I need to stack the data (see result below). I wrote the syntax below - it's very basic and it does what I need. But I am sure what I am trying to do is a very typical task and there must be a much shorter/more elegant way of doing it. Any advice? Thank you very much!
2010 Mar 06
1
transposing data
Hi. I have repeated measures data of the form where each observation is a trial, and trials are grouped by subject, and variables encode whatever level of a factor was present during that trial, and the dependent variable is response time (RT). I want to transpose the data to a form suitable for MANOVA such that there is one observation per subject and RT is recoded across many
2013 Dec 11
2
[LLVMdev] AVX code gen
Hello - I found this post on the llvm blog: http://blog.llvm.org/2012/12/new-loop-vectorizer.html which makes me think that clang / llvm are capable of generating AVX with packed instructions as well as utilizing the full width of the YMM registers… I have an environment where icc generates these instructions (vmulps %ymm1, %ymm3, %ymm2 for example) but I can not get clang/llvm to generate such
2006 Mar 10
1
what's wrong with my "cov"?
Hi all, Why cov(y, y) only gives one value, and cov(t(y), t(y)) gives 3x3 NA matrix? Here my y is listed below and it is a 3x1 matrix. I am expecting that if I have a random vector y=[y1 y2 y3]', here " ' " denotes a transposition so that y is a column vector, where y1, y2, y3 are independent random variables... then cov(y, y) should be E[ y * y' ] - E[y] * E[y] ',