similar to: compare a vector and a row of a matrix

Displaying 20 results from an estimated 800 matches similar to: "compare a vector and a row of a matrix"

2011 Apr 20
2
get cells by the combination of their column and row names
Hi, I have a (correlation) matrix and I want to select a subset of its cells depending on the combination of their column and row names. This illustrates my problem: mtrx <- matrix(c(1,2,3,4,5,6,7,8,9), nrow=3, ncol=3, dimnames = list(c('c132','c432', 'c233'), c('r132','r233', 'r432')))> mtrx r132 r233 r432c132 1 4 7c432 2
2012 Mar 13
1
Visualising multiple response contingency tables
Dear R Help Community, I have a question and an answer (based on reading this forum and online research), but I though I should share both since probably there's a much better way to go about my solution. My question is specifically about how to best visualise multiple response contingency tables. What I mean by 'multiple response' is that the total number of responses per row of a
2005 Nov 19
5
help with apply, please
Dear list, I have a problem with a toy example: mtrx <- matrix(c(1,1,0,1,1,1,0,1,1,0,0,1), nrow=3) rownames(ma) <- letters[1:3] I would like to determine which is the minimum combination of rows that "covers" all columns with at least a 1. None of the rows covers all columns; all three rows clearly covers all columns, but there are simpler combinations (1st and the 3rd, or 2nd
2010 Sep 29
1
get response from a glm
Hi everyone: ¡¡I am new to R and I have a really basic question. I have already got a generalized linear model from some dataset, say y=b0 + b1X1 + b2X2. Then I want to get the value of y provided, say, X1=1, X2=2. And the confidence Intervals of this y. I know I can just calculate that since I know the model already. But is there some code that can calculate those automatically?
2003 Dec 15
2
help in lme
To anyone who can help, I have two stupid questions, and one fairly intelligent question Stupid question (1): is there an R function to calculate a factorial of a number? That is...is there a function g(.) such that g(3) = 6, g(4) = 24, g(6) = 720, etc? Stupid question (2): how do you extract the estimated covariance matrix of the random effects in an lme object? Intelligent question
2005 Jan 21
2
Struggling with S3/S4 interface issues and External Pointers
I'm currently working on embedding R into the Apache2 webserver (with some positive results...), but I'm struggling to identify the best way to expose the apache data and functions to R. A couple of thoughts: In light of the recent discussion on "S3/S4 classes performance comparson", I'm leaning toward implementing the interface with S3 style classes. I appreciate
2005 Sep 04
1
specification for glmmPQL
Hello All, I have a question regarding how glmmPQL should be specified. Which of these two is correct? summary(fm.3 <- glmmPQL(cbind(response, 100 - response) ~ expt, data = data.1, random = ~ 1 | subject, family = binomial)) summary(fm.4 <- glmmPQL(response ~ expt, data = data.2, random = ~ 1 | subject, family =
2009 Aug 14
7
"sudo gem install rails" not able to install thin dependency
Hi folks, I''m having trouble getting gems to install rails. It just keeps asking me which version of thin I want to install. Until I choose skip or cancel, in which case I''m told that something has gone wrong. Any advice? Thanks kindly, Tommy PS: Gems is 0.94. --------------------------------------------------------------------- tommy@tommy-laptop:~/www/blog$ sudo gem
2011 Mar 25
4
read.xls -> rotate data.frame
Hi to all, how could I to rotate automatically a data sheet which was imported by read.xls? x1 x2 x3 .... xn y1 1 4 7 ... xn/y1 y2 2 5 8 .... xn/y2 y3 3 6 9 ....xn/y2 yn ... ... ... Xn/Yn to y1 y2 y3 .... yn x1 1 2 3 ..... Yn/x1 x2 4 5 6 .... Yn/x2 x3 7 8 9 .... Yn/x2 xn ... ... ... ..... Yn/xn Kind regards Knut
2005 Mar 02
2
Problems installing gems using rails
Hello I''m trying to use rubyonrails, but had some troubles: First, there was an issue with gems (it did not finished the installation): # gem install rails Config file /root/.gemrc does not exist Attempting local installation of ''rails'' Local gem file not found: rails*.gem Attempting remote installation of ''rails'' Updating Gem source index for:
2012 Oct 02
2
The entry of Xen's exception handler
Hi, I am trying to understand the exception handler of Xen. In xen/arch/x86/x86_64/entry.S, the entry of the page fault handler is : ENTRY(page_fault) movl $TRAP_page_fault,4(%rsp) jmp handle_exception Here I did not get why to put the exception vector ($TRAP_page_fault) to stack before calling handle_exception? Thanks, -- Xinxin
2007 Dec 26
1
Can you recover default argument values of a function?
Hi. Maybe this is a stupid question. If so, I apologize, but here goes. Suppose I have a function f1(x,...) that calls a function f2(y1,y2,...,yn) in the following way: if x satisfies a certain condition, then I want to call f2(x,y2,...,yn); otherwise I want to use the default value of y1, if there is one. I could do something like the following: v <- ifelse ( is.null(x), f2( , y2,...,
2009 Jun 02
1
plot 4th variable contour lines on filled.contour
Hello, I have a dataset with 4 variables, each consisting of a vector, all with the same length. I start by interpolating the first three variables using the function "interp", and plot the interpolation successfully using "filled.contour". I then interpolate the first two variables and a fourth using "interp" again, but when I try to overlay the contour lines
2008 Dec 11
3
getting ISO week
Hi all, Is there a simple function already implemented for getting the ISO weeks of a Date object? I couldn't find one, and so wrote my own function to do it, but would appreciate a pointer to the "default" way. If a function is not yet implemented, could the code below be of interest to submit to CRAN? Best Regards, Gustaf --------------------
2005 Mar 22
9
am i the only one with this problem?
(clean install) >gem install rails Attempting local installation of ''rails'' Local gem file not found: rails*.gem Attempting remote installation of ''rails'' Install required dependency activesupport? [Yn] y Install required dependency activerecord? [Yn] y Install required dependency actionpack? [Yn] y Install required dependency actionmailer? [Yn] y
2009 Jun 01
2
Webgeb 0.5.x possible in Windows XP?
Hi Colin, I think fcgi is only required for testing. I do without it and directly open the output files in my browser. Maybe try saying no to ramaze or whatever depends on fcgi? On Mon, Jun 1, 2009 at 18:02, Colin MacNaughton <colin.macnaughton at gmail.com> wrote: > I''m trying to install the latest webgen on Windows XP but am met with: > > [C:/Programs] gem install webgen
2010 Jan 24
3
system vs shell wait command
Dear All, I try to invoke a second program (called "gencont") within a R script. However this second program needs some time to finish. After finishing the output should be read into R and used for further calculation. Under windows, it perfectly works: result<-shell("gencont < yn.txt",intern=TRUE,wait=TRUE) # R waits untill the program finishes (apporx 3 min) and
2008 Jun 24
2
persp plot
I have a set of data in the form x1, y1, z1 x1, y2, z2 ... x1, yN, zN x2, y1, z(N+1) x2, y2, z(N+2) ... x2, yN, z(2N) ...and so on... xM, yN, val(M*N) I have been trying to figure out how to get R to use this data in a persp plot. So far the only thing that I can figure out to do is to break the data file into three different files. The first file contains the x-coordinate data: x1 x2
2020 Nov 26
1
Error CLUSTER : no se puede ubicar un vector de tamaño 1.7 gb
Buenas Estimados: Quer?a saber si me pueden ayudar por favor. Estaba tratando de generar cluster?s con un set de datos que tengo.Es un set de datos de unas 100 mil filas, y 16 columnas (son datos reales) Pero me aparece el siguiente error: "ERROR no se puede ubicar un vector de tama?o 1,7 Gb?. Adem?s, Busque un poco en internet sobre unas librer?as para realizar el algoritmo de matriz de
2012 Dec 06
1
Question on local_irq_save/local_irq_retore
Hi, I have some confusion on local_irq_save() and local_irq_restore(). From the definitions, you can see that local_irq_save() calls local_irq_disable(). But why there is no local_irq_enable() in local_irq_restore? #define local_irq_save(x) ({ local_save_flags(x); local_irq_disable(); }) #define local_irq_restore(x) ({ BUILD_BUG_ON(sizeof(x) != sizeof(long)); asm volatile (