similar to: Newbie Question -- Remove entire column in a matrix

Displaying 20 results from an estimated 10000 matches similar to: "Newbie Question -- Remove entire column in a matrix"

2007 Jul 25
1
Rgraphviz and R 2.5.1 entry point Rf_allocString could not be located
Dear R-Helpers In R 2.5.1, the command library(Rgraphviz) fails on my Windows (XP SP2) system with error popup "The procedure entry point Rf_allocString could not be located in the dynamic link library R.dll". Thanks in advance for any suggestion in solving the error. My D. Coyne Imagination is more important than knowledge... (Albert Einstein) mcoyne@boninc.com
2008 Mar 02
1
Could not install aroma.affymetrix
I don't know if this is the correct forum to ask the following question; however, when I search the aroma.affymetrix discussion group, it suggested that I should posted the question to r-help. Here it goes. I followed the instructions on aroma.affymetrix trying to install the packages; following are the steps: > install.packages(c("R.oo", "R.utils"),
2008 Feb 13
2
How to handle Which on two matrices that do not have same number of rows
R-newbie question I have 2 matrices (a) P1 has only one column of 32K rows (b) PC has 2 column {P, C} of 3200 rows Every values in P1 matches with a value in PC[,p] (column p). I would like to use Which to search for all value in P1 that matchex PC[,p] and get the PC[,c]. However because P1 and PC does not have the same number of rows, I got lots of 'NA'. Thanks for your
2008 Feb 02
2
Ignore error t.test in a loop
Hi, I place a t.test in a loop and would like to continue to process the loop even when t.test encounter error. How do I do that? For example, in one iteration, the data is completely constant and t.test gives error, the entire program terminates. I would like to write the information out to a file, and the loop should continue. Thanks My D. Coyne [[alternative HTML version
2009 Jan 08
1
cosinor analysis
Hallo, I didnĀ“t found any facilities for Halbergs cosinor analysis in R. This analysis is well known in the Chronobiology as the least square approximation of time series using cosine function of known period (in my case of 24hours-period). I tried to write a script but crashed... Can you give me some advices, please!? Thanks Anne Berger Institute of Zoo- and Wildlife Research, Berlin, Germany
2006 Dec 10
4
sample "n" random positions from a matrix
Hi there, I have a binary matrix (dim 100x100) filled with values 0 and 1. I need select a record "n" positions of that matrix when values are 1. How can I do that? Thanks for all, Miltinho Brazil --------------------------------- [[alternative HTML version deleted]]
2008 Jan 13
2
Retrieve only part of a matrix
Hi All, I'm new with R; this is a basic question. I was given a matrix I of (nrow, ncol), I would like to create another matrix A with some data in the matrix I, say [1,4] (row 1, column 4) to [271,19000] (row 271, column 19000). How do I do this? Please help. Thank you very much. --mc [[alternative HTML version deleted]]
2008 Jan 15
2
In chisq.test(x) : Chi-squared approximation may be incorrect
Hello, I received the following warning when running chi-square; n Is there a way to catch the 'error' code of 'warning' after run chisq.test(x)? n What does this error mean? Thank you for your help. [[alternative HTML version deleted]]
2010 Oct 01
2
How to apply vector value function to a multidimensional array indexed by the remaining dimensions?
Hi, I am looking for some generalization of colSums and rowSums for general vector valued functions, and for arrays of more than 2 dimensions. So as a concrete example, suppose I have a 3 dimensional array, given by x = array(1:100,c(3,4,5)). and I want to sum the 3rd index of x to obain a 3 by 4 matrix. Using rowSums would return a vector of length 3 because it treats the last two indices as
2010 Aug 04
2
discrete ECDF
Dear list; I just created a utility function that replicates what I have done in the past with Excel or OO.org by putting a formula of the form =sum($A1:A$1) in an upper-corner of a section and then doing a "fill" procedure by dragging the lower-rt corner down and to the right. When divided by the grand sum of the entries this function then calculates a 2D-discrete-ECDF. I
2008 Jan 23
4
image question
Hi, I have a question regarding the image function. Is there a way to specify a separate color set for each column in the matrix? TIA, ajar. [[alternative HTML version deleted]]
2008 Jan 13
4
For Loop performance
Hello, Newbie question and hope you can help . I have two vector V1 and V2, where length(V2) = length of (V1) * 2; length(V1) ~ 16,000. For each member in V1, I need to compare 2 element of V2 for equality i.e. for (I in 1:length (V1)) { if ( v2[i] == v1[i] & v2[i+1]==v1[i] ){ statement_1 statement_2 . } } This for-loop is too slow
2010 Jan 21
3
Na.omit on matrix, does the matrix have to have a limited size
Hello everyone, I am using the na.omit() function on a 785 x 79 matrix. When I restrict the matrix to 10 columns for example it returns me the right result with the na rows deleted: 756 x 10 matrix. But, if I enter the whole matrix it returns me a 64 x 79 matrix, ununderstandable, I have no idea why...Does anyone know what it could be? thanks -- View this message in context:
2006 Sep 09
2
duplication matrix
Dear R-list members, Just wondering if there is any way to compute the duplication matrix in R. I tried to search for it but only found functions "xpnd" and "vech". Basically for a symmetric n by n matrix A, the duplication matrix D_n is a matrix of dimension n^2 by n(n+1)/2 such that D_n vech(A)= c(A), where c(A) just vectorizes A. The duplication matrix is defined on page
2009 Dec 16
1
difference between the meaning of MARGIN in sweep() and apply()
For example, subtracting 1:2 from the rows of a two-column matrix: > t(apply(matrix(1:6,ncol=2),MARGIN=1,function(y) y - 1:2)) [,1] [,2] [1,] 0 2 [2,] 1 3 [3,] 2 4 > sweep(matrix(1:6,ncol=2),MARGIN=2,1:2,FUN="-") [,1] [,2] [1,] 0 2 [2,] 1 3 [3,] 2 4 Is there a logic to this difference, or is it just a quirk of the history of these
2006 May 12
4
bitwise addition
Hello all again, I want to do bitwise addition in R. I am trying to generate a matrix 0000 0001 0010 .... .... 1111 I know the other ways of generating this matrix but I need to look at bitwise addition. Any suggestions??? thanks a lot Nameeta ------------------------------------------------- This email is intended only for the use of the individual or...{{dropped}}
2010 Nov 23
1
Slow update(insert) on Data.frame
Hi When I try to update an number in a large data.frame by its pos It's really slow it take almost a sec to do this and I wonder why and if where is any faster way to update a number in a data.frame ive tried DF$col[POS]<-number DF[xPOS,yPOS]<-number Thx //Joel -- View this message in context: http://r.789695.n4.nabble.com/Slow-update-insert-on-Data-frame-tp3055707p3055707.html
2006 Oct 09
2
shifting a huge matrix left or right efficiently ?
I'm wondering what's the best way to shift a huge matrix left or right. My current implementation is the following: shiftMatrixL <- function(X, shift, padding=0) { cbind(X[, -1:-shift], matrix(padding, dim(X)[1], shift)) } X <- shiftMatrixL(X, 1)*3 + shiftMatrixL(X,2)*5... However, it's still slow due to heavy use of this function. The resulting matrix will only be read once
2012 Dec 04
1
inconsistencies between ?class and ?UseMethod
Hi, The 2 man pages give inconsistent description of class(): Found in ?class: If the object does not have a class attribute, it has an implicit class, ?"matrix"?, ?"array"? or the result of ?mode(x)? (except that integer vectors have implicit class ?"integer"?). Found in ?UseMethod: Matrices and arrays have class ?"matrix"?
2007 Apr 16
1
Greek symbols in xtable rows
Dear R-helpers, I am using xtable package to prepare a Latex code of some R tables. Is this possible to have a greek symbols in xtable cells? How can I get for example a string of : $\Delta$ > "$\Delta$" [1] "$Delta$" And string: > "$\\Delta$" [1] "$\\Delta$" Gives a latex aoutput like: \$$\backslash$Delta\$ Thank You in advance Andris