similar to: test individual values in rows

Displaying 20 results from an estimated 10000 matches similar to: "test individual values in rows"

2008 Jul 17
4
help with data layout
Hello list I have been given some Excel sheets with data laid like this: Col1 Col2 A 3 2 3 B 4 5 4 C 1 4 3 I was hoping to import this into R as a csv and then get the mean and SD for each letter in column 1. Could someone give me some guidance on best to approach this? Thanks Iain
2011 Jun 29
1
median time period
Hello List I'm trying to calculate the median period (in months) of a set of time intervals (between two interventions). I have been playing with the lubridate package to create the intervals but I can't think of the right approach to get the median timeperiod. Toy code: library(lubridate) test <- c('08-04-22', '08-07-28', '09-03-02', '09-03-03',
2005 Oct 16
3
asking the user for data
Hello everyone. How do I get R to ask users for data to be entered? Specifically I want to ask for a z score to be entered (the user would look this up in a table) and then use the entered data to compute a Dunn's post-hoc test (post kruskal.test). I've tried the "ask" function but it's not recognised - maybe I don't have to appropriate libary installed. A pointer
2005 Sep 27
2
multiple plots on same x axis
Hi. I have two vectors of gene expression for each of several days. I want to plot both vectors on the same plot for a visual representation of up versus down regulation. I've tried using add=T but that doesn't work. eg >plot(Day, gene1) >plot(Day, gene2, add=T) Any help would be appreciated. Iain
2009 May 23
2
counting occurrence of text in a dataframe
Hello list. I am hoping for some help with a relatively simple problem. I have a data frame arranged as below. I want to be able to count the occurrence of each gene (eg let-7e) by Experiment. In other words how many times does a given gene crop up in the dataframe. I tried table but couldn't work out how to get the output I want. I have also considered rearranging this data into a list (by
2009 Dec 08
2
Upgrading To 2.10 from 2.6.2
Hello I have a Linux machine (Ubuntu 8.04 hardy, Gcc version 4.2.4 (i486-linux-gnu) currently running R 2.6.2. I'd like to upgrade to 2.10. First Question): What is the appropriate way to remove the old version of R? Part 2. After downloading r-base_2.10.0.orig.tar.gz and opening the archive. I ran the ./configure routine. It failed claiming that it could not find the F77 compiler. My
2012 Jul 20
1
conditional subset and reorder dataframe rows
Hi List I have a dataframe (~1,200,000 rows deep) and I'd like to conditionally reorder groups of rows in this dataframe. I would like to reorder any rows where the Chr.Strand column contains a '-' but reorder within subsets delineated by the Probe.Set.Name column. # toy example #### library(plyr) negStrandGene <- data.frame(Probe.Set.Name =
2012 Nov 28
3
write out list of lists with names
Hello List I have a list question. I'm doing some data wrangling for a colleague and I have nested list in the following format: structure(list(MU10 = structure(c(0.80527905920989, 0.4350488707836, 0.455195366623, 0.565174432205497, 0.208180556861924), .Names = c("MU.16", "MU.19", "MU.21", "mean", "sd")), MU11 =
2011 Nov 08
3
ggplot2 reorder factors for faceting
Dear List I am trying to draw a heatmap using ggplot2. In this heatmap I have faceted my data by 'infection' of which I have four. These four infections break down into two types and I would like to reorder the 'infection' column of my data to reflect this. Toy example below: library(ggplot2) # test data for ggplot reordering genes <- (rep (c(rep('a',4),
2009 May 30
1
arithmetic problem
Hello list I have a problem with a dataset (see toy example below) where I am trying to find the difference between two (or more numbers) and discard those observations which fall outside a set interval. An example and further explanation: values ind 1 2655 7A5 2 3028 7A5 3 689 ABBA-1 4 1336 ABBA-1 5 1560 ABBA-1 6 2820 ABLIM1 7 3339 ABLIM1 8
2010 Dec 18
0
[BioC] problem with function
Hi Christian, Chuck (and lists) It seems that the problem may be the strange behaviour of 'unstack' inside a function. See this thread in the R mailing list: http://tolstoy.newcastle.edu.au/R/help/04/03/1160.html Anyway, I got round the problem by using 'aggregate' instead of converting to a list and then tapply to sum values of metric. Probably more efficient as well. Thanks
2009 Jun 20
1
string splitting and testing for enrichment
Hi List I have data in the following form: Gene    TFBS NUDC     PPARA(1) HNF4(20) HNF4(96) AHRARNT(104) CACBINDINGPROTEIN(149) T3R(167) HLF(191) RPA2     STAT4(57) HEB(251) TAF12     PAX3(53) YY1(92) BRCA(99) GLI(101) EIF3I     NERF(10) P300(10) TRAPPC3     HIC1(3) PAX5(17) PAX5(110) NRF1(119) HIC1(122) TRAPPC3     EGR(26) ZNF219(27) SP3(32) EGR(32) NFKAPPAB65(89) NFKAPPAB(89) RFX(121)
2005 Oct 10
4
plot - no main title and missing abscissa value
Hi all. I have defined a plot thus: par(mar=c(5,5,4,5),las=1, xpd=NA) plot(Day, Ym1Imp, ylim=c(0,100), type="b", bty="l", main="Ym1 Expression", cex=1.3, xaxt="n", yaxt="n") #plot implant data axis(side=1, at=c(0,1,3,5,7,10,14,21), labels=c(0,1,3,5,7,10,14,21)) # label x axis mtext("Day", side =1, at=10, line=3, cex=1.2) # title x
2006 Feb 08
2
rotating axis / mtext labels
Hello list. Is it possible to use par(srt=45) to rotate text by 45 degrees along the x-axis of a plot. Using: <code> x_names<-c("C57 Nv", "C57 Vacc", "129 Nv", "129 Vacc", "IFNgR Nv", "IFNgR Vacc") par(srt=45) mtext(font=2, x_names, side=1, line=1, at=l, cex=1.2) par(srt=0) </code> doesn't seem to work in R 2.2.0
2005 Oct 17
1
Dunn's post hoc test
Hi Everyone. I am rather new to R and I've been trying to implement a function to carry out the above test. For a couple of days now I've been stuck on how to generate average rank differences. Say I have a vector of average ranks: averank<- c(2,5,9,12) I would like to subtract averank[1] from averank[2], averank[1] and averank[2] from averank[3] and averank[1], averank[2] and
2012 May 30
1
reading file in zip archive
Hi List I have a series of zip archives each containing several files. One of these files is called goCats.txt and I would like to read it into R from the archive. It's a simple tab delimited text file. pathToZip <- '/home/iain/Documents/Work/Results/bovineMacRNAData/deAnalysis/afInfection/commonNorm/twoHrs/af2hrs.zip' z <- unz(pathToZip, 'goCats.txt', 'r') zT
2008 Mar 10
2
SORT MATRIX
I have a matrix with 2 columns and n row. I need sort the matrix by the first column but the second row must be sort in the same order that the first column. Somebody know how I can sort this matrix. Thanks very much -- View this message in context: http://www.nabble.com/SORT-MATRIX-tp15955823p15955823.html Sent from the R help mailing list archive at Nabble.com.
2005 Dec 10
2
odd error
Hi All. I am getting a rather odd error using R 2.2.0 on Suse Linux 10. I write R scripts in the text editor Kate and then execute them using e.g >source ("timecourse_il4.r") in R. I have been moving these scripts between a linux box and a Mac and for that reason have a line quartz(display="", width=7, height=7)# set quartz graphics window size for linux change this to
2008 Feb 11
4
Conditional rows
Hi, Given a simple example, test <- matrix(c(0.1, 0.2, 0.1, 0.2, 0.1, 0.1, 0.3, 0.1, 0.1), 3, 3) How to generate row indexes for which their corresponding row values are less than or equal to 0.2 ? For this example, row 2 and 3 are the correct ones. Thanks [[alternative HTML version deleted]]
2010 Aug 09
3
Extract values from data frame in R
Using R, I would like to find out which Samples (S1, S2, S3, S4, S5) fulfill the following criteria:contain minimally one value (x, y or z) bigger than 4. Any ideas? Thanks, Alex. > data Sample x y z 1 S1 -0.3 5.3 2.5 2 S2 0.4 0.2 -1.2 3 S3 1.2 -0.6 3.2 4 S4 4.3 0.7 5.7 5 S5 2.4 4.3 2.3