similar to: same value in column-->delete

Displaying 20 results from an estimated 400 matches similar to: "same value in column-->delete"

2009 Mar 20
1
reshape dataframe
Hi, I have a large dataset on which I would like to do the following: x<-data.frame(id=c(1,2,3), snp1=c("AA","GG", "AG"),snp2=c("GG","AG","GG"),snp3=c("GG","AG","AA")) > x id snp1 snp2 snp3 1 1 AA GG GG 2 2 GG AG AG 3 3 AG GG AA And then
2009 Apr 09
5
data.fram zero's
Hi all, A simple question which I don???t seem to be able to solve: I want to make a data.frame of 360 rows and 94228 column with only zero???s without having to type all these zero???s ;-) What is the easiest method? Thanks, Naomi Disclaimer: De informatie opgenomen in dit bericht (en bijlagen) kan vertrouwelijk zijn en is uitsluitend bestemd voor
2010 Apr 13
2
transpose but different
Hi all, I want to make extra columns in my datafile where the id of every groupmember is mentioned in separate columns. To explain it better see the example: id<-c(1,2,3,4,5,6,7,8,9,10,11,12) group<-c(1,1,1,1,2,2,3,3,3,3,3,3) a<-as.data.frame(cbind(id,group)) a id group 1 1 1 2 2 1 3 3 1 4 4 1 5 5
2009 Jun 03
1
strsplit for multiple columns
Hi, I am trying to split multiple columns. One column works just fine, but I want to do it for multiple columns??? Example > a ID V2 V3 V4 V5 V6 V7 V8 V9 V10 1 PBBA0644 -- GG AA -- AA -- AA GG GG 2 PBBA1010 -- GG AA -- AA -- AA GG GG 3 0127ATPR -- GG AA -- AA -- AA GG GG 4 0128EHAB -- GG AA -- AG -- AA AG GG 5 PBBA0829 -- GG AA -- AA -- AA GG AG
2011 Mar 10
1
snp-chip table
Dear R helpers I have a table and i need to make new table table1: sire snp1 snp2 snp3 snp4 snp5 snp6 snp7 snp8 snp9 snp10 snp11 snp12 snp13 snp14 snp15 8877 -1 -1 -1 -1 0 0 -1 -1 -1 0 1 1 1 -1 -1 7765 1 1 1 0 0 0 -1 1 1 1 0 0 0 1 0 8766 1 1 -1 0 -1 -1 0 -1 0 -1 -1 -1 0 1 0 6756 0 1 0 -1 1 -1 -1 0 0 0 0 -1 0 1 1 5644 -1 0 1 -1 0 0 0 0 -1 -1 0 0 0 0 1 I have table2 sire
2009 Feb 27
5
Filtering a dataset's columns by another dataset's column names
Hello all, I hope some of you can come to my rescue, yet again. I have two genetic datasets, and I want one of the datasets to have only the columns that are in common with the other dataset. Here is a toy example (my real datasets have hundreds of columns): Dataset 1: Individual SNP1 SNP2 SNP3 SNP4 SNP5 1 A G T C A 2 T C A G T 3 A C T
2010 Aug 05
2
a question about 'read.table' with or without 'read.table'.(urgent)
Hi, I've got a quite tricky question. I have a txt file, named 'temp.txt', as the following: snp1 snp2 snp3 AA 00 00 GG GG 00 00 AA 00 I want to read the file into R. 1) when I use 'read.table' without 'header=T' option, > temp <- read.table('temp.txt') # I got > temp V1
2010 Aug 05
2
questions about string handling
Hi, I have a question about the data handling. I have a dataset as following: ID snp1 snp2 snp3 1001 0/0 1/1 1/1 1002 2/2 3/3 1/1 1003 4/4 3/3 2/2 I want to convert the dataset to the following format: ID snp1 snp2 snp3 1001 00 AA AA 1002 GG
2009 Nov 27
1
problem tick marker and text
Hi R-ers, I am struggling with my x-axis in a association plot. What I would like is to place the labels of the x-axis between the tick markers and normally the labels are printed at the place where the tick marker is placed. I don???t want to move the tick marker (it gives the switch between one chromosome and the next) but I just want to put the chromosome number in between the
2011 Jan 22
1
R TABELS
Hi ihave one table that look like SNP1 SNP2 SNP3 SNP4 SNP5 SIRE1 1 -1 -1 1 -1 SIRE2 1 -1 1 1 1 SIRE3 -1 -1 1 1 0 SIRE4 -1 1 1 0 1 SIRE5 -1 1 -1 -1 1 SIRE6 0 0 0 1 -1 SIRE7 -1 0 -1 1 1 SIRE8 1 -1 NA 0 NA SIRE9 -1 1 1 -1 -1 SIRE10 1 1 1 1 1 table 2 only one line SNP1 SNP2 SNP3 SNP4 SNP5 SIRE100 -1 -1 1
2013 Jul 02
2
Recoding variables based on reference values in data frame
I'm new to R (previously used SAS primarily) and I have a genetics data frame consisting of genotypes for each of 300+ subjects (ID1, ID2, ID3, ...) at 3000+ genetic locations (SNP1, SNP2, SNP3...). A small subset of the data is shown below: SNP_ID SNP1 SNP2 SNP3 SNP4 Maj_Allele C G C A Min_Allele T A T G ID1 CC GG CT AA ID2 CC GG CC AA ID3 CC GG nc AA
2011 Jul 27
1
SNP Tables
Hello, I have indicators for the present of absent of a snps in columns and the categorey (case control column). I would like to extract ONLY the tables and the indices (SNPS) that give me 2 x 3 tables. Some gives 2x 2 tables when one of the allelle is missing. The data look like the matrix snpmat below: so the first snp should give me the following table: (aa=0, Aa=1 and AA=2) aa
2011 Jan 23
1
SNP IMPUTATION
Hi ihave one table that look like SNP1 SNP2 SNP3 SNP4 SNP5 SIRE1 1 -1 -1 1 -1 SIRE2 1 -1 1 1 1 SIRE3 -1 -1 1 1 0 SIRE4 -1 1 1 0 1 SIRE5 -1 1 -1 -1 1 SIRE6 0 0 0 1 -1 SIRE7 -1 0 -1 1 1 SIRE8 1 -1 NA 0 NA SIRE9 -1 1 1 -1 -1 SIRE10 1 1 1 1 1 table 2 only one line SNP1 SNP2 SNP3 SNP4 SNP5 SIRE100 -1 -1 1 1 -1 I need to male
2009 Sep 01
1
permutation and reshuffling
Hi, I'm looking for an efficient code that will enable me to reshuffle data (phenotype) for certain number of individuals and creating a loop that will randomly simulate it for 10000 times *(permutation)*. I also need to find how I keep the information (p value for each SNP) gathered for all the 10000 iterations. My data set looks like this (n=500): Individual # Phenotype SNP1 SNP2
2008 May 13
2
array dimension changes with assignment
Why does the assignment of a 3178x93 object to another 3178x93 object remove the dimension attribute? > GT <- array(dim = c(6,nrow(InData),ncol(InSNPs))) > dim(GT) [1] 6 3178 93 > SNP1 <- InSNPs[InData[,"C1"],] > dim(SNP1) [1] 3178 93 > SNP2 <- InSNPs[InData[,"C2"],] > dim(SNP2) [1] 3178 93 > dim(pmin(SNP1,SNP2)) [1] 3178 93
2009 Feb 13
2
select on letter
Hi, I was wondering if anybody can help me. In the small data set below I would like to select the index which doesn't contain the letter 'N' in the variable 'letters'. How can I discard these rows when the letter has a different position everytime (but the same letter for the whole column)? index<-c(1,2,3) letters<-c("CCTTGGAA", "NNTTGGAAT",
2008 Jan 21
2
reordering huge data file
Dear R-experts, My problem is how to handle a 10GB data file containing genotype data. The file is in a particular format (Illumina final report) and needs to be altered and merged with phenotype data for further analysis. PERL seems to be an frequently used solution for this type of work, however I am inclined to think it should be doable with R. How do I open a text-file, line by line,
2009 Sep 22
2
glm analysis repeated for 900 variables
Dear R users, Could you help my with the following problem? I want to repeat a glm analysis with 2 independent variables for all 900 variables (snps) in my data set. So, I want to check whether snp1 has a different effect on my outcome variable in patients and controls(phenotype). And repeat that for snp2 to snp900. Is there an easy way to get a summary of the data, e.g. a list of P values of all
2009 Apr 22
3
Merging data frames, or one column/vector with a data frame filling out empty rows with NA's
Hello I have two data frames, SNP4 and SNP1: > head(SNP4) Animal Marker Y 3213 194073197 P1001 0.021088 1295 194073197 P1002 0.021088 915 194073197 P1004 0.021088 2833 194073197 P1005 0.021088 1487 194073197 P1006 0.021088 1885 194073197 P1007 0.021088 > head(SNP1) Animal Marker x 3213 194073197 P1001 2 1295 194073197 P1002 1 915 194073197
2011 Jan 03
0
Using PCA to correct p-values from snpMatrix
Hi R-help folks, I have been doing some single SNP association work using snpMatrix. This works well, but produces a lot of false positives, because of population structure in my data. I would like to correct the p-values (which snpMatrix gives me) for population structure, possibly using principle component analysis (PCA). My data is complicated, so here's a simple example of what