search for: sauburn

Displaying 10 results from an estimated 10 matches for "sauburn".

Did you mean: auburn
2010 Oct 08
4
function using values separated by a comma
Hello, I have a dataframe (tab separated file) which looks like the example below - two values separated by a comma, and tab separation between each of these. [,1] [,2] [,3] [ ,4] [1,] 0,1 1,3 40,10 0,0 [2,] 20,5 4,2 10,40 10,0 [3,] 0,11 1,2 120,10 0,0 I would like to calculate the percentage of the smallest number separated by the comma by: 1) summing the values e.g. for
2012 Jul 02
4
R sub query
Hello, I would like to substitute a substring of characters defined by a specific start and end sequence. i.e. in the example matrix below, I would like to substitute ".:X:" with "", where X varies in sequence...   m<-matrix(c(".:0:0,0", ".:2:0,2", ".:194:193,1", ".:56:0,56", ".:58:50,8", ".:13:0,13", 
2010 May 02
2
Replace query
Hi, I'm trying to replace all values equal to 1 in one file (a) with the value in the corresponding column in a separate file (b). Example below. Any help (and brief notes if poss) much appreciated. Thanks!! file a: 0,0,1,1,0 1,0,0,0,1 0,0,0,0,0 1,0,1,1,0 file b: 3,4,6,8,11 output request: 0,0,6,8,0 3,0,0,0,11 0,0,0,0,0 3,0,6,8,0 -- View this message in context:
2010 Oct 12
1
Comparison of two files with multiple arguments
Hello, I have an example file which can be generated using: dat <- read.table(tc <- textConnection( 'T T,G G T C NA G G A,T A A NA'), sep="") I also have a reference file with the same number of rows, for example: G C A I would like to transform the file to numerical values using the following arguments: 1) Where data points have two letters separated by a comma, e.g.
2010 Apr 30
1
How to generate a distance matrix?
Hi, I'm trying to generate a distance matrix between sample pairs (example below). I'm not very familiar with the loop command which I expect I will need for this. The example below demosntrates what I'd like to get out of the data - essentially, to calculate the proportion of positions where two samples differ. Any help much appreciated! Also, any notes on how the functions work
2010 Apr 27
2
Histogram not plotting correct breaks
Hi, I'm using the hist function to plot the frequency of 21 variables, but it keeps starting the x-axis from 0 and adding variables 1 and 2 together (all other vairables have the correct frequencies). I suspect it adds 1 and 2 together so that 0 can fit in with demarcations at intervals of 5. Using "xlim=c(1,21)" to specify that i don't want to include 0 and using the
2010 Apr 09
3
How to replace all non-maximum values in a row with 0
Hi, I would like to replace all the max values per row with "1" and all other values with "0". If there are two max values, then "0" for both. Example: from: 2 3 0 0 200 30 0 0 2 50 0 0 3 0 0 0 0 8 8 0 to: 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 Thanks! -- View this message in context:
2010 Apr 25
1
How to assign scores to rows based on column values
Hi, I'm trying to assign a score to each row which allow me to identify which rows differ. In the example file below, I've used "," to indicate column separators. In this example, I'd like to identify that row 1 and row 5 are the same, and row 2 and row 4 are teh same. Any help much appreciated. Also, any comments on what the command lines do would be fantastic. Thanks!!
2012 Jun 07
1
table function in a matrix
Hi, I am trying to get a summary of the counts of different variables for each sample in a matrix of the form "m" below to generate an output as shown. (Ultimately I want to generate a stacked barchart for each sample). I am only able to get the "table" function to work on one sample (column) at a time. Any help appreciated. Thank you Sarah   a<-c("A",
2012 Jul 06
1
function on strsplit output
Hi, I am trying to format some data (example matrix "m" below) for which each data point has 2 associated values separated by a comma. I want to replace values <3 with "0" to give the example output below. I have got as far as: out<-lapply(strsplit(m,","),as.numeric) Failed to identify anything along the lines of "[out<3]<-0" that works... Thank