similar to: Delete rows from matrix having at least one zero value

Displaying 20 results from an estimated 10000 matches similar to: "Delete rows from matrix having at least one zero value"

2005 Jul 27
3
how to overlook the zero in the denominator
Dear R users: I have two set of data, as follow: x<-c(0,0,0.28,0.55,1.2,2,1.95,1.85, 1.6,0.86,0.78,0.6,0.21,0.18) y<-c(0,0,0,0.53,1.34,1.79,2.07,1.88, 1.52,0.92,0.71,0.55,0.32,0.19) i<-1:length(x) I want to sum each (x[i]-y[i])^2/x[i] together, like: >Sum <-sum((x[i]-y[i])^2/x[i]) >Sum [1] NaN Because the denominator shoud not be zero. So I want to overlook those
2008 Feb 26
2
Kalman Filter
Hi My name is Vladimir Samaj. I am a student of Univerzity of Zilina. I am trying to implement Kalman Filter into my school work. I have some problems with understanding of R version of Kalman Filter in package stats( functions KalmanLike, KalmanRun, KalmanSmooth,KalmanForecast). 1) Can you tell me how are you seting the initial values of state vector in Kalman Filter? Are you using some method?
2018 Jan 04
2
format integer numbers with leading 0
Dear R-er, I would like format integer number as characters with leading 0 for a fixed width, for example: 1 shoud be "01" 2 shoud be "02" 20 should be "20" Now I use: x <- c(1, 2, 20) gsub(" ", "0", format(x, width=2)) But I suspect more elegant way could be done directly with format options, but I don't find. Thanks a lot Marc
2008 Sep 17
2
modifying patterns in a matrix
Dear R-users, I have some very simple data where 1's represent events and zeroes non-events, e.g. temp <- rbind(c(0,1,0,0,1,1,1,0), c(0,0,0,1,0,0,0,0)) For each row in the matrix, I would like to replace a singelton event by a 0. That is, any 1 surrounded by zeroes (010) should be replaced by a zero (000). Sequences of 1's should be left unchanged. So the modified matrix shoud look
2008 Nov 28
6
How to delay failed ssh auth
Hi! I need to delay failed ssh password authentication as an additional measure against brute force ssh attacks. I understand, that shoud be accomplished through pam, but googling gave me no example. I have CentOS 5.2. -- Veiko Kukk
2005 Oct 07
6
Applying a function to each element of an array
Hi, I have a 7000x7000 matrix, and each element is an integer. For each element, I want to apply the function : wt <- 0 for(q in 1:count){ wt <- wt + 0.5^(q-1) } I get the value of 'count' from the elements in the matrix , and want to store the corresponding 'wt' value for that element. I suppose I could loop through the matrix, and apply the function to each
2005 Nov 28
6
How define global Variable?
Hello, I try to define a global variable. My example: R> a <- "old" R> test <- function () { a <- "new" } R> test() R> a # shoud be "new" This doesn't work. I would like to modify the variable "a" in a procedure. How can I do that. Thank you for helping. Sven Kn侟ppel (Germany-Berlin)
2004 Oct 29
1
as.list.matrix
I found the need of converting a matrix into a list of its columns (for use with do.call), and was surprised there was no method as.list.matrix, it could easily be a part of as.list default I wrote my.as.list.matrix <- function(mat) { if(!is.matrix(mat))stop("Argument must be a matrix") n <- NCOL(mat) res <- vector(mode="list", length=n)
2006 Feb 13
5
search algorithm
Hi! I have a problem of finding a specific value in a column. For example, I have a matrix with say 2 columns X Y 1 -2.0341602 9.036689e-05 2 -1.4287230 1.807338e-04 3 -1.1194402 2.711007e-04 4 -1.0327582 3.614676e-04 5 -0.8130556 4.518344e-04 6 -0.7138212 5.422013e-04 7 -0.6634425 6.325682e-04 8 -0.6512083 7.229351e-04 9
2013 Feb 04
2
Version 5.01 not passing kernel command line args to memtest86+as it can understand
Hello, I'm trying to pass the serial port options to memtest86+ using Syslinux 5.01 but is not working. Debugging the memtest86+, the check at main.cpp function static void parse_command_line(void) if (*OLD_CL_MAGIC_ADDR != OLD_CL_MAGIC) return; Is being evaluated to true. What should I do? There is a way to instruct memtest to use the "old way" to pass
2006 Jul 25
2
Cron not sending e-mails anymore
Hi, I have a cronjob that executes a script that has some echo statements in it and the commands in it also generate output (it copies files, reloads services, etc...). Recently, cron stopped sending its output by e-mail. I restarted cron, without success. Any ideas where I shoud start to debug this? Regards, Ugo
2003 Feb 19
5
Subpopulations in Complex Surveys
Hi, is there a way to analyze subpopulations (e.g. women over 50, those who answered "yes" to a particular question) in a survey using Survey package? Other packages (e.g. Stata, SUDAAN) do this with a subpopulation option to identify the subpopulation for which the analysis shoud be done. I did not see this option in the Survey package. Is there another way to do this?
2010 Sep 30
3
Kernel Panic When restarting the server
Hello, I'm getting a KErnel Pannic every time i restart the server, what could be happening? I just make: "shutdown -r now" and the server gets Kernel Panic. I'have to go on site and press the power button Here you have my sotware versions: Asterisk 1.4.24.1 DAHDI Tools Version - 2.1.0.2 DAHDI Version: 2.1.0.4 libpri version: 1.4.10.1 WANPIPE Release: 3.5.4 IS there
2019 Aug 11
2
doveadm / vsize
Hi, i want to keep track of user mailbox size, I'm using doveadm mailbox status -u <user> vsize INBOX for a given mailbox this is under reporting ( by a lot) is this recursive? what shoud i be using to get an accurate disk usage metric? thanks Paul. -- ------------------------- Paul Macdonald IFDNRG Ltd Web and video hosting ------------------------- t: 0131 5548070 m:
2009 Mar 02
2
Changes in specs for routes in rspec 1.1.99.x
Trying the next release of rspec, I have had to make changes in the existing specs for routing. I have written an script with sed that makes this automatically (two files) spec/upgrade.sed ================ /route_for/s/id => 1/id => "1"/g /route_for.*create/s/== \(["''].*["'']\)/== {:path => \1, :method => :post}/ /route_for.*update/s/==
2007 Jul 30
2
HVM domain on NAS
Hi Users, Is it possible to create an HVM domain on NAS location. Did anybody tried this on RHEL5 ? I create a HVM domain using a file disk "using dd with ext3 on this", but what i want is to rooted the OS / on the NAS location directly and it shoud be booted from that location. Thanks in advance for any kind of suggestions. -Trilok _______________________________________________
2006 Aug 21
2
[LLVMdev] Recalculating live intervals
On 8/7/06, Chris Lattner <sabre at nondot.org> wrote: > > On Sun, 6 Aug 2006, Anton Vayvod wrote: > > I'm developing a register allocator that works iteratively. It spills > some > > virtual registers on each iteration until all the rest have physical > ones > > assigned. > > Take a look at the linear scan allocator. It is also iterative: it uses >
2012 Apr 26
1
How to delete rows from dataframe that sum to zero
Hello, I am trying to figure out how to delete all rows which sum to zero from a dataframe. I do not have a column with the sum of each column yet, so perhaps that would need to be done first? Thank you for any help anyone can offer with this. Emily PS sorry if this question has already been answered in a previous thread, I did look through them & one seemed relevant, but I couldn't
2005 Jan 10
3
Mixing portrait/landscape in a postscript file
Dear list, I'm stuck with a little graphical problem. I'm generating several lattice plots which are printed in a single postcript device opened by > trellis.device(postscript, theme=canonical.theme("postscript", color=F), file="an_phase2_graph.ps", paper="a4", pointsize = 10, onefile=TRUE, horizontal=TRUE) Everything works fine,but some of these
2005 Jul 31
2
bash file direct execution
Hi all. I have a little strange problem. I created a file called 'test.sh' in the root directory containing: #!/bin/sh echo test When I execute it with '/test.sh' there is no output. When I source it by executing it with '. /test.sh' the output comes ok. When I move it to '/root' and execute it with '/root/test.sh' then it works perfectly. When I move it