similar to: column to row

Displaying 20 results from an estimated 10000 matches similar to: "column to row"

2006 Jun 30
3
data extraction
Dear mailing list I have a data that have 20,000 rows and 20 columns. Io wonted to extract the 10th row only. Example the 10th, 20th, 30th 40th…..20000 th. can you please help me how do I do that.Than kyou. Example is below. Inpute: AG GG GG AG CC CC CC CC CT CC CT CT GG GG GG GG CC CC CC CC GG GG GG GG CC CC CC CC GG CG CG GG GG GG GG GG *CC CC CC CC* AA AG AG AA AA AA AA AA GG AG AG GG GG AG AG
2006 Jun 17
2
managing data
Dear mailing list, may some one be kind to help me solve following problem. I am trying to write a code that will combine two tables "x" and "y". The first columns of both tables are unique identification for the rows. The first column of table "X" is a sub set of the first column of "Y". I need to find the matching rows in both tables by looking on their
2006 Jun 14
2
data managment
First I would really like to thank the mailing list for help I got in the past, as a new to R I am really needing some support on hoe to code the following problem. I am trying to sort some data I have in a big file. The file has 4 columns and 19000 rows. An example of it looks like this:- G 0.892 A 0.108 G 0.883 T 0.117 T 0.5 C
2006 Jul 28
1
spliting
Dear mailing list, I have a big data frame and each element in the matrix has two alphabets. I want to split those alphabets into two so each element will have one alphabet and the number of my columns will be doubled . So can some one help with the code? Example of what I want is to split them. Input (three column) GG AG AG CC CC CC CC CC CC AG
2006 May 22
1
editing a big file
I have a file that has 90 columns and 20,000 rows and looks like C/G CC GG CG G/T GG TT GT C/T CC TT CT A/G AA GG AG A/C AA CC AC A/T AA TT AT I want to write a code that will read through each row first the first looks at the first column and then replace the three columns with 12 if it is the same as the first column e.g. third column 11 if it is a repeat of the first alphabet like the
2005 Mar 25
2
How to split a single vector into a multiple-column and multiple-row matrix
Dear List, I have, say, a 2000x1 numeric vector and would like to split it into, say, a 200x10 matrix. Any help is appreciated.
2006 May 29
2
newbie question: ROW average
Dimitris Rizopoulos wrote: > look at ?rowMeans; you can also use "apply(mat, 1, mean)" but > rowMeans() is better. By my reading of the question, this is not what Ezhil wants. He said: ``I have a 992 x 74 matrix. I would like to form a new matrix by averaging each 4 rows from the original one.'' I.e. he wants (I think) the first row of the new matrix to be the
2006 Jun 12
2
select the last row by id group
Dear R users: I have a small test dataframe as the follows : math = c(80,75,70,65,65,70) reading = c(65,70,88,NA,90,NA) id = c('001','001','001','002','003','003') score = data.frame(id, reading, math) > score id reading math 1 001 65 80 2 001 70 75 3 001 88 70 4 002 NA 65 5 003 90 65 6 003 NA 70
2008 Mar 02
3
elegant way to minus on each row of a matrix
How to do this in an elegant way formatrix/data frame/zoo? mat= 1 2 3 4 5 6 7 8 9 vector= 1 2 3 result= 0 1 2 2 3 4 4 5 6 ie 1-1 2-1 3-1 4-2 5-2 6-2 7-3 8-3 9-3 Thanks in advance. _________________________________________________________________ 08 [[alternative HTML version deleted]]
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
2007 May 20
2
Number of NA's in every second column
Hi R-users, How do I calculate a number of NA's in a row of every second column in my data frame? As a starting point: dfr <- data.frame(sapply(x, function(x) sample(0:x, 6, replace = TRUE))) dfr[dfr==0] <- NA So, I would like to count the number of NA in row one, two, three etc. of columns X1, X3, X5 etc. Thanks in advance Lauri [[alternative HTML version deleted]]
2006 Nov 19
4
The most common row in a matrix?
Hi, How do you get the most common row from a matrix? If I have a matrix like this array(1:3,dim=c(4,5)) [,1] [,2] [,3] [,4] [,5] [1,] 1 2 3 1 2 [2,] 2 3 1 2 3 [3,] 3 1 2 3 1 [4,] 1 2 3 1 2 in which rows 1 and 4 are similar, I want to find that vector c (1,2,3,1,2). Atte Tenkanen University of Turku, Finland
2006 Apr 07
3
strange matrix behaviour: is there a matrix with one row?
Consider this: > y <- matrix(1:8, ncol=2) > is.matrix(y[-c(1,2),]) [1] TRUE > is.matrix(y[-c(1,2,3),]) [1] FALSE > is.matrix(y[-c(1,2,3,4),]) [1] TRUE It seems like an inconsistent behaviour: - with 2 or more rows we have a matrix - with 1 row we do not have a matrix and - with 0 rows we have a matrix again I just stumbled on this behaviour, because I had a problem with my
2004 Jun 11
4
rownames of single row matrices
Hi I want to extract rows of a matrix, and preserve rownames even if only one row is selected. Toy example: R> a <- matrix(1:9,3,3) R> rownames(a) <- letters[1:3] R> colnames(a) <- LETTERS[1:3] R> a A B C a 1 4 7 b 2 5 8 c 3 6 9 Extract the first two rows: R> wanted <- 1:2 R> a[wanted,] A B C a 1 4 7 b 2 5 8 rownames come through fine. Now extract just
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to do this weekend to understand every bit but your code will prove very useful. Cheers, Aziz -----Original Message----- From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be] Sent: May 12, 2006 4:35 PM To: Chaouch, Aziz Subject: RE: [R] Maximum likelihood estimate of bivariate
2008 Feb 26
1
Split data.frames depeding values of a column
Hello to all is there a function wich splits a data.frame (column1,column2,column3,....) into data1 <-(column1,column3....) #column2 = 1 data2 <-(column1,column3....) #column2 = 2 data3 <-(column1,column3....) #column2 = 3 ... Regards Knut
2008 Mar 11
1
How to generate column names for pairwise comparison
Hi, Given names <- c("a", "b", "c", "d"). I would like to generate "a vs. b", "a vs. c", "a vs. d", "b vs. c", "b vs. d", "c vs. d" Thanks [[alternative HTML version deleted]]
2007 Aug 20
1
Select rows of matrix
Hi I would appreciate if anyone could help me with an elegant solution of the following: I have a matrix that contain a small number of -Inf values. How can form a new matrix from the old one that excludes all the rows with -Inf values ? Thank you. Jacob Dept of Statistics University of Johannesburg South Africa [[alternative HTML version deleted]]
2008 Apr 09
4
apply lm() for all the columns of a matrix
Hi all, My question is not really urgent. I can write a loop and solve the problem. But I know that I'll be in a similar situation many more times so it would be useful to find out the answer Is there a fast way to perform linear fit to all the columns of a matrix? (or in the one dimension of a multi-dimensional array.) I'm talking about many single linear fits, not about a multiple fit.
2008 Feb 02
2
transforming one column into 2 columns
Hello I have a data frame and one of its columns is as follows: Col chr1:71310034 chr14:23354088 chr15:37759058 chr22:18262638 chrUn:31337214 chr10_random:4369261 chrUn:3545097 I would like to get rid of colon (:) and replace this column with two new columns containing the terms on each side of the colon. The new columns should look as follows: Col_a Col_b chr1