search for: jdsandjd

Displaying 18 results from an estimated 18 matches for "jdsandjd".

2008 Sep 14
5
difference of two data frames
Hello I have 2 data frames DF1 and DF2 where DF2 is a subset of DF1: DF1= data.frame(V1=1:6, V2= letters[1:6]) DF2= data.frame(V1=1:3, V2= letters[1:3]) How do I create a new data frame of the difference between DF1 and DF2 newDF=data.frame(V1=4:6, V2= letters[4:6]) In my real data, the rows are not in order as in the example I provided. Thanks much Joseph [[alternative HTML version
2008 Sep 03
3
subsetting a data frame
I have a data frame that looks like this: V1 V2 V3 a b 0:1:12 d f 1:2:1 c d 1:0:9 where V3 is in the form x:y:z Can someone show me how to subset the rows where the values of x, y and z <= 10: V1 V2 V3 d f 1:2:1 c d 1:0:9 Thanks Joseph [[alternative HTML version deleted]]
2008 Feb 12
3
merging more than 2 data frames
Hi merge() takes only 2 data frames. What can you do to it to make take more than two data frames? or is there another function that does that? Thanks joseph ____________________________________________________________________________________ Looking for last minute shopping deals? [[alternative HTML version deleted]]
2008 Feb 10
11
data frame question
Hello I have 2 data frames df1 and df2. I would like to create a new data frame new_df which will contain only the common rows based on the first 2 columns (chrN and start). The column score in the new data frame should be replaced with a column containing the average score (average_score) from df1 and df2. df1= data.frame(chrN= c(“chr1”, “chr1”, “chr1”, “chr1”, “chr2”, “chr2”, “chr2”),
2008 Jul 27
1
64-bit R on Mac OS X 10.5.4
...oftware Overview: System Version: Mac OS X 10.5.4 (9E17) Kernel Version: Darwin 9.4.0 Boot Volume: Macintosh HD Boot Mode: Normal ----- Original Message ---- From: Matthew Keller <mckellercran at gmail.com> To: Steven McKinney <smckinney at bccrc.ca> Cc: joseph <jdsandjd at yahoo.com>; r-help at r-project.org Sent: Saturday, July 26, 2008 9:15:41 AM Subject: Re: [R] 64-bit R on Mac OS X 10.4.5 Hi Joseph, For what it is worth (which might not be that much!), I have written down step by step instructions on my website for getting 64 bit R working under Leopard -...
2008 Feb 06
4
inserting text lines in a dat frame
Hi Jim I am trying to prepare a bed file to load as accustom track on the UCSC genome browser. I have a data frame that looks like the one below. > x V1 V2 V3 1 chr1 11255 55 2 chr1 11320 29 3 chr1 11400 45 4 chr2 21680 35 5 chr2 21750 84 6 chr2 21820 29 7 chr2 31890 46 8 chr3 32100 29 9 chr3 52380 29 10 chr3 66450 46 I would like to insert the following 4 lines at the beginning:
2008 May 25
3
naming components of a list
Hi I have a character vector with thousands of names which looks like this: > V=c("Fred", "Mary", "SAM") > V [1] "Fred" "Mary" "SAM" > class(V) [1] "character" I would like to change it to a list: > L=as.list(V) > L [[1]] [1] "Fred" [[2]] [1] "Mary" [[3]] [1] "SAM" but I need to
2008 Feb 18
3
remove column names from a data frame
I want to remove the column names from a data frame. I do it the long way, can any body show me a better way ? df= data.frame(chrN= c(“chr1”, “chr2”, “chr3”), start= c(1, 2, 3), end= c(4, 5, 6), score= c(7, 8, 9)) df #I write a txt file without row or column names write.table(df,"df1.txt",sep='\t',quote=FALSE,row.names=F,col.names=F) #then I read it with the header = F
2008 Feb 04
1
counting identical data in a column
Hi Peter I have the following data frame with chromosome name, start and end positions: chrN start end 1 chr1 11122333 11122633 2 chr1 11122333 11122633 3 chr3 11122333 11122633 8 chr3 111273334 111273634 7 chr2 12122334 12122634 4 chr1 21122377 21122677 5 chr2 33122355 33122655 6 chr2 33122355 33122655 I would like to count the positions that have the same start and
2008 Feb 08
1
convertin a data frame column from character to numeric
I have a data.frame with all character columns, I would like to convert the last two columns into numeric.> x[1:5, ] chrN start end 1 chr1 71310034 71310064 2 chr14 23354088 23354118 3 chr14 71310034 71310064 4 chr15 37759058 37759088 5 chr22 18262638 18262668 > apply(x, 2, FUN = mode) chrN start end
2010 Mar 07
2
data.frame question
hello can you show me how to create a data.frame from two factors x and y. column 1 should be equal to x and column 2 is 1 if it is common to y and 0 if it is not. x=factor(c("A","B","C","D","E","F","G")) y=factor(c("B","C","G")) the output should look like this: A 0 B 1 C 1 D 0 E
2008 Feb 23
2
counting sequence mismatches
Hello I have 2 columns of short sequences that I would like to compare and count the number of mismatches and record the number of mismatches in a new column. The sequences are part of a data frame that looks like this: seq1=c("CGGTGTAGAGGAAAAAAAGGAAACAGGAGTTC","CGGTGGTCAGTCTGGGACCTGGGCAGCAGGCT", "CGGGCCTCTCGGCCTGCAGCCCCCAACAGCCA")
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
2008 Feb 11
0
Testing for differecnes between groups, need help to find the right test in R. (Kes Knave)
...posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Csardi Gabor <csardi at rmki.kfki.hu> UNIL DGM ------------------------------ Message: 27 Date: Sun, 10 Feb 2008 11:38:13 -0800 (PST) From: joseph <jdsandjd at yahoo.com> Subject: [R] data frame question To: r-help at r-project.org Cc: r-help at r-project.org Message-ID: <109232.80965.qm at web36905.mail.mud.yahoo.com> Content-Type: text/plain Hello I have 2 data frames df1 and df2. I would like to create a new data frame new_df which will...
2009 Jan 22
0
write.fasta (seqinr package)
Hi I would like to use 'write.fasta(sequences, names, nbchar = 60, file.out, open = "w")' to convert a DNA sequence in a text file to fasta format. How do I read the the text file to prepare the argument 'sequences' of the function. The DNA sequence in the text file is one line as below: ATCACACAACGACACTCACCCTGGACGCTCATC......... Thank you [[alternative HTML
2011 May 26
0
time series comparison
Hi I have 2 time series consisting of sequence of data points measuring flies activity at time intervals of 20 min over a period of 24 hrs. One time series is from control flies while the other is from flies treated with a drug. My question is to find out if the drug has a significant effect on fly activity. What is the appropriate R packages to compare the 2 time series? Thank you for your
2008 Feb 15
2
Remove rows with NA across all columns
Hi I have a data frame df with 3 columns. Some rows are NA across all 3 columns. How can I remove rows with NA across all columns? df=data.frame(col1=c(1:3,NA,NA,4),col2=c(7:9,NA,NA,NA),col3=c(2:4,NA,NA,4)) Thanks Joseph ____________________________________________________________________________________ Be a better friend, newshound, and [[alternative HTML version deleted]]
2008 Jul 26
1
64-bit R on Mac OS X 10.4.5
Hello I have a Mac OS X 10.4.5. I am trying to build a 64-bit R by following the directions on this page: http://r.research.att.com/building.html r_arch=x86_64 \ CC="gcc -arch x86_64 -std=gnu99" \ CXX="g++ -arch x86_64" \ OBJC="gcc -arch x86_64" \ F77="gfortran -arch x86_64" \ FC="gfortran -arch x86_64" PATH=/usr/X11/bin:/usr/local/bin:$PATH