similar to: How do I find the index for a value in an array

Displaying 20 results from an estimated 30000 matches similar to: "How do I find the index for a value in an array"

2009 May 29
2
Drawing schematics
Hi, I would like to represent the treatment course of a subject with an arrow representing passage through time and various ticks, arrows, or bars representing treatments done to the patient along the arrow. I would like to generate this sort of schematic for each patient in a database taking information from the database such as time of treatment and type of treatment. Does anybody know how I
2010 Jan 20
2
How do I juxtapose two lattice graphs with common X axes such that the X axes line up?
Hello, I would like to juxtapose two lattice graphs with common X axes such that the X axes line up. I am using plot right now but the edges are not neat and it would be nice if I could just draw 1 X axis and not both of them. Here is my code: upper<-bwplot(SignalUsed~as.factor(AllNormalHitsNamesCount),data=NmlOverviewArray2, xlab="", ylab="Intensity of Individual
2009 Apr 10
2
Two different scales for the same axis in the same plot.
Hello, Could anyone tell me how to plot data on two different scales in the same axis in the same plot? Here is my quandary: The range of my X axis runs from 0 to 10, but the majority of my meaningful data lies between 7 and 10. The data from 0 to 7 is essentially noise. Is there a way for me to present my data such that the range from 0 to 7 takes up a smaller amount of space on the graph
2009 Feb 05
1
question about running multiple R windows
Hello, I use R on a Microsoft Windows machine. Is it possible for me to open multiple windows of R, have them run the same program but for different data sets, and get accurate results? It takes 8+ hours to run the program so I want to multitask as much as possible. Thanks in advance, George Chen
2011 Mar 08
1
repeat matrix column within each array third dimension
Hello all, I'm working with a matrix that will have varying dimensions. It will populate an array such that the number of matrix columns will determine the number of 3rd dimension levels of the array. Rows will be the same for both. For this example lets say the array will have 2 columns, but that's not fixed. dim(arr)<-c(dim(mat)[1],2,dim(mat)[2]) I wish to repeat each matrix
2010 May 09
1
Is it possible to rearrange the facets in ggplot while keeping everything else the same?
Hello, First, ggplot2 is great! Second, sorry for the basic nature of my question. I have data in the form of a melt table like this: Subject Day Ab Variable Value 1 1 Yes A 3 1 3 Yes A 5 1 5 Yes A 7 2 1 No A 2 2 3 No A 4 2 5 No A 6 3 1 Yes A 1 3 3 Yes A 3 3 5 Yes A 5 4 1 No A 4 4 3 No A 6 4 5 No A 8 1 1 Yes B 3 1 3 Yes B 5 1 5 Yes B 7 2 1 No B 2 2 3 No B 4 2 5 No B 6 3 1 Yes B 1 3 3 Yes B 3 3 5
2010 Aug 08
3
Does anybody know how to control the appearance of the end of the line in lattice?
Hi All, I am plotting vertical lines using xyplot in lattice and type="h". It works well, but the problem is that the tops of the lines are convex and the bottoms are concave. Is there a way to flatten the tops and bottoms? Here's my code: Source<-matrix(1:30,10,3) colnames(Source)<-c("x","y1","y2") Source<-data.frame(Source) xyplot(y2+y1~x,
2003 Apr 02
7
Index of item in matrix
Hello All, Is there a fast way to find the index(row and column) of a point in a matrix? Thanks, John. -- -------------------------------------------------------------------------- Dr. John Janmaat Department of Economics, Acadia University, Wolfville, NS, B4P 2R6 E-mail: jjanmaat at acadiau.ca Web: http://ace.acadiau.ca/~jjanmaat Tel: 902-585-1461 Fax: 902-585-1070
2009 May 07
1
making an Affybatch object for expresso
Hi All, I have microarray data that does not come in a CEL file. Currently it is in the form of columns = individual samples and rows = individual probes. There are about 79 columns and it is in a tab delimited text file. Is there a way to convert this file into an AffyBatch so that I can run expresso with it? Thanks, George
2009 May 08
1
problem with normalize.quantiles
Hi All, I am using normalize.quantiles (package preprocessCore) to process a 8300 row x 96 col matrix, all numerical data. When I limit the input matrix to 8300 x 67, the function works fine and my data is normalized. But when I increase the input matrix size to 8300 x 68, the function processes but instead of giving normalized data, it gives me all the same number. With 96 columns (the whole
2010 May 06
1
How do I plot geoms in parallel in ggplot
Hello, I am new to ggplot. Please forgive my ignorance! I have patient data such that each individual is a row and then the attributes are in columns. So for example: Subj Time Height Weight WBC Plt 1 1 9 4 4 150 1 2 10 5 6 200 1 3 11 6 5 250 1 4
2010 Jul 06
4
Assign Formulas to Arrays or Matrices?
Hi, I am very new to R. I am hoping to create formulas and assign them to locations within an array (or matrix, if it will work). Here's a simplified example of what I'm trying to do: form.arr <- array(31,5,3) for (i in seq(from=1, to=31, by=1)) { for (j in seq(from=1, to=5, by=1)) { form.arr[i,j,] <- as.formula(y~1+2) } } which results in this error: Error in form.arr[i, j,
2006 Aug 11
2
Array#chunk method, maybe someone will find this useful
class Array # break an array up into <size> chunks def chunk(size=1) return self if self.empty? raise ArgumentError if !size.kind_of? Integer y = self.length.divmod(size) rows = (y[1] > 0) ? y[0] + 1 : y[0] arr = Array.new(rows) (0...rows).each do |i| arr[i] = self.slice(size*i, size) end (arr.last.length...size).each { |i| arr.last[i] = nil }
2007 Aug 17
1
[BioC] function to find coodinates in an array
The arr.ind in the which function does the job very nicely!!! Thank you everyone for the suggestions! Ana > > >---- Mensaje Original ---- >De: marc_schwartz at comcast.net >Para: m_olshansky at yahoo.com >Asunto: Re: [BioC] [R] function to find coodinates in an array >Fecha: Thu, 16 Aug 2007 21:53:44 -0500 > >>If I am correctly understanding the problem, I think
2009 Sep 10
2
index of min elements in matrix
Hi, All, How can I get the indices of the minimum elements in a matrix without using a loop? For example, if the matrix is 4 5 2 2 8 9 5 2 3 Then I want to output (1,3), (2,1), (3,2). Thanks, Annie [[alternative HTML version deleted]]
2005 Sep 28
3
is it possible to form matrix of matrices...and multiple arrays
Dear sirs, 1...........Kindly tell me is it possible to form a matrix which contains a no of matrices.. for eg.. if a,b,c,d are matrices.... and e is a matrix which contains a,b,c,d as rows and columns.. 2..........Is it possible to form array of array of arrays for eg.. "A" contains two set of arrays (1,2)...and each A[1] and A[2] individually contains two set of arrays I tried like
2006 Mar 07
3
returning the largest element in an array/matrix?
Hi all, I want to use "which.max" to identify the maximum in a 2D array/matrix and I want "argmin" and return the row and column indices. But "which.max" only works for vector... Is there any convinient way to solve this problem? Thanks a lot! [[alternative HTML version deleted]]
2017 Jul 06
3
Efficient swapping
Thanks a lot, Ista! I really appreciate it. How about a slightly different case as the following: set.seed(1) (tmp <- data.frame(x = 1:10, R1 = sample(LETTERS[1:5], 10, replace = TRUE), R2 = sample(LETTERS[2:6], 10, replace = TRUE))) x R1 R2 1 C B 2 B B 3 C E 4 E C 5 E B 6 D E 7 E E 8 D F 9 C D 10 A E Notice that the factor levels between
2012 Aug 09
2
[LLVMdev] The use-define chain in LLVM
Maybe My statement is not clear. Take an example: main.c: int global; void fun(int array[], int i){ array[i] = i + 1; global = i; } int main(){ int arr[40], i = 0; fun(arr, 10); return 0; } Can I determine whether the value of arr array and global variable have changed after the function call, fun(arr, 10), by LLVM API? It could be more complicated considerring the nested function
2012 Aug 09
2
[LLVMdev] The use-define chain in LLVM
Thanks for your response! But I want to determine wheter the specific variable's value has been changed between two usages of variable, and wheter the parameter's value is changed in a function. Like the reaching definition analysis, and ud chains. 2012/8/9 ��f�� (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw>: > On Thu, Aug 09, 2012 at 11:16:15AM +0800, Jianfei Hu wrote: >>