search for: thompson1

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

Did you mean: thompson
2012 Nov 11
2
Cropping a matrix by rows
Hello r-help, I've been banging my head against the computer in an attempt to learn how to divide my matrix into segments by rows. I want to be able to return each segment as a newly named object. I've tried looking at the apply functions and creating a for loop but brain no work. Here's the basic starting objects that I believe would be needed to separate the matrix. mat <-
2012 Oct 15
2
Chopping a two column data frame by rows into a three dimensional array.
If I have a two column data frame like: > dat <- cbind("x"=c(1:100),"y"=c(100:1)) How can I create an array that splits every ten rows of that data frame into a third dimension of an array so that: > newarray[,,1] ,,1 x y 1 100 2 99 3 98 ... ... 10 91 ,,2 x y 11 90 12 89 ... ... ... Thanks. [[alternative HTML version deleted]]
2012 Apr 27
6
Returning the coef from two coordinates
Thank you to everyone in this forum that has been helping me with the basic R skills while I learn to apply them. I would like to take the coefficient of two coordinates. One of them comes from two different columns in a table: >A x y a 1 3 b 2 2 c 3 1 the other is set and for this question I'll just call it (1,1) I've been trying to find a way to return the
2012 Jun 14
1
Can someone recommend a package for SNP cluster analysis of Fluidigm microarrays?
I know that there are quite a few packages out that there for cluster analysis. The problem that I am facing is finding a package that will not incorporate all my samples into clusters but just the samples that fit a threshold (that I have not set yet and may need help finding the right level) for genotyping. It should be able to "no call" samples outside the clusters. It also needs to
2012 May 23
3
applying cbind (or any function) across all components in a list
#If I have two lists as follows a1<- array(1:6, dim=c(2,3)) a2<- array(7:12, dim=c(2,3)) l1<- list(a1,a2) a3<- array(1:4, dim=c(2,2)) a4<- array(5:8, dim=c(2,2)) l2<- list(a3,a4) #how can I create a new list with the mean across all arrays within the list, so all components are included? As an example for [[1]]; cbind((l1[[1]][,1]+l2[[1]][,1])/2,
2012 Apr 23
3
Newbie Question on making subsets for every element of a table column
Hello, very new to R, playing with tables, and I am trying to do x <- subset(data, columnlabel == x) for every element in my column that I could find by using table (data [,"columnlabel"]) I'd appreciate any useful help and I'm sorry if I didn't get the terminology perfect. Thanks. -- View this message in context:
2012 Apr 24
2
Basic matrix manipulation problem
Hello, this forum was very helpful yesterday with a simple question I had on working with tables. What function will I need to use to do the following. Move matrix a: A B C D x 1 2 3 4 y 5 6 7 8 to the mean of B&C and C&D: BC CD x 2.5 3.5 y 6.5 7.5 and then to the mean of B&CB, C&BC, C&CD, and D&CD: AAB BAB
2012 Aug 20
1
Creating ordered colors for ordered factors
I have been trying to find a way to label my cluster with the colors I want using factors. I am not having a good time. I can make the plot I'm looking for but how can I make it so I specify that my ordered factors have ordered colors (1= "blue", 2="green", 3="red")? x <- c(rnorm(10,1,1),rnorm(10,10,1),rnorm(10,10,1)) y <-
2012 Dec 11
2
Two statement logical dealing with NAs
Hello. I have a two statement logical that if NA is returned for the second statement I want to rely on result of the first statement. I still would like to use both when I can though. x <- c(1:5) y <- c(1,2,NA,4,5) x < 5 & x-y == 0 How can I trick R to refer back to (x < 5) where it is NA on the third value? Thanks. [[alternative HTML version deleted]]
2013 Mar 02
1
Raster images and saving with original pixel dimensions in tiff, jpeg, or png perferablly.
Hello R-Help, I want to be able to read in a raster image, plot it with grid.raster or rasterImage and save the image with one pixel per a pixel element from my array. Saved preferably in a common image format. The real goal of my question is to eventually read in images with text on them, manipulate them with my controlled functions, save them without changing the image dimensions, and perform