similar to: sum() returns 0 not NA

Displaying 20 results from an estimated 10000 matches similar to: "sum() returns 0 not NA"

2004 Jul 06
5
Converting S-Plus Libraries to R
Dear all! I'd like to do multiple imputation of missing values with s-plus libraries that are provided by Shafer (http://www.stat.psu.edu/~jls/misoftwa.html). I wonder, whether these libraries are compatible or somehow convertible to R (because I don't have S-plus), so that I can use this functions using the R Program. I would be happy if you could tell me, -if it is possible to use
2008 Jun 23
2
Writing Vector to a File
Dear experts, I try not to trouble the list again after this question. I want to print this vector into a file > myvec [1] --Control --Control --Control --Control --Control HBA2 HBA1 [8] HBA1 --Control HBB --Control HBB HBA1 MBP [15] --Control HBA1 HBA2 HBB PTGDS GAPDH UBC [22] --Control GAPDH TPT1 HUWE1 PRM1 CKM
2009 Mar 10
6
Pseudo-random numbers between two numbers
I would like to generate pseudo-random numbers between two numbers using R, up to a given distribution, for instance, rnorm. That is something like rnorm(HowMany,Min,Max,mean,sd) over rnorm(HowMany,mean,sd). I am wondering if dnorm(runif(HowMany, Min, Max), mean, sd) is good. Any idea? Thanks. -james
2012 Apr 05
2
"NA" vs. NA
Dear All, I assume this is an R-devel issue, apologies if I missed something obvious. I have a dataframe where the row names are country codes, based on ISO 3166, something like this: ------------ "v1" "v2" "UK" 1 2 "NA" 2 3 ------------ It happens that "NA" is the country code for "Namibia", and that creates problems on
2015 Nov 05
3
Problem with DNS configuration and "host" command . . .
I'm following the instructions here -- https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller I've successfully "tested" my domain controller -- adam at eagle:~$ smbclient -L localhost -U% Domain=[SMBDOMAIN] OS=[Unix] Server=[Samba 4.1.18-Debian] Sharename Type Comment --------- ---- ------- netlogon
2007 Nov 21
4
NA values
Hi all! I am new to R and I would like to ask you the following question:How can I substitute the NA values with 0 in a data frame? I cannot find a command to check if a value is NA... Thank you very much! Eleni
2007 Mar 05
4
0 * NA = NA
Is there any way to "force" 0 * NA to be 0 instead of NA? For example, suppose I have a vector with some valid values, while other values are NA. If I matrix-pre-multiply this by a weight row vector, whose weights that correspond to the NAs are zero, the outcome will still be NA: x <- c(1, NA, 1) wt <- c(2, 0, 1) wt %*% x # NA Alberto Monteiro
2006 Oct 06
1
Sum of Bernoullis with varying probabilities
Hi Folks, Given a series of n independent Bernoulli trials with outcomes Yi (i=1...n) and Prob[Yi = 1] = Pi, I want P = Prob[sum(Yi) = r] (r = 0,1,...,n) I can certainly find a way to do it: Let p be the vector c(P1,P2,...,Pn). The cases r=0 and r=n are trivial (and also are exceptions for the following routine). For a given value of r in (1:(n-1)), library(combinat) Set <- (1:n)
2015 Nov 05
2
Problem with DNS configuration and "host" command . . .
On 11/05/2015 12:14 PM, Reindl Harald wrote: > > > Am 05.11.2015 um 18:08 schrieb Steve Ankeny: >> 'network-manager' is not installed but 'resolvconf' is -- >> >> adam at eagle:~$ cat /etc/resolv.conf >> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by >> resolvconf(8) >> # DO NOT EDIT THIS FILE BY HAND -- YOUR
2013 Dec 14
2
iterated sum
x<-c(1,4,9,20,3,7) i want to get a serie c(5,13,29,23,10). y <- c() for (i in 2:length(x)){ y[i-1] <- x[i-1]+x[i]} is there more simple way to get? [[alternative HTML version deleted]]
2011 Jun 05
2
kronecker sum
Dear All, Could someone please suggest how to find the Kronecker sum of two 2x2 matrices, i.e. given two matrices: -A A a -a and -B B b -b I need: -A-B A B 0 a -a-B 0 B b 0 -A-b A 0 b a -a-b Many thanks, Lara [[alternative HTML version deleted]]
1999 Aug 31
1
AutoCAD R14 and Eagle Point
Samba List: Is anyone out there using AutoCAD R14 and Eagle Point? One of my clients received the latest version of Eagle Point, and the time to load files has become horrible. It has increased from 1 min to 15 min! All files are on the Linux server and the stations we did the initial tests with are PIII w/128MB RAM. The AutoCAD file loads quick, but once the Eagle Point files begin to load
2010 Apr 15
4
Does "sink" stand for anything?
Hello Everyone,   Learning about R and its wonderful array of functions. If it's not obvious, I usually try to find out what a function stands for. I think this helps me remember better.   One function that has me stumped is "sink." Can anyone tell me if this stands for something?   Thanks,   Paul         __________________________________________________ [[alternative HTML
2015 Nov 05
2
Problem with DNS configuration and "host" command . . .
On 11/05/2015 11:38 AM, Rowland Penny wrote: > On 05/11/15 16:21, Steve Ankeny wrote: >> I'm following the instructions here -- >> >> https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller >> >> >> I've successfully "tested" my domain controller -- >> >> adam at eagle:~$ smbclient -L localhost -U%
2017 Jun 06
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>> on Fri, 2 Jun 2017 04:05:15 -0700 writes: > Hi, I have a long numeric vector 'xx' and I want to use > sum() to count the number of elements that satisfy some > criteria like non-zero values or values lower than a > certain threshold etc... > The problem is: sum()
2012 Apr 13
3
A little exercise in R!
Greetings all! A recent news item got me thinking that a problem stated therein could provide a teasing little exercise in R programming. http://www.bbc.co.uk/news/uk-england-cambridgeshire-17680326 Cambridge University hosts first European 'maths Olympiad' for girls The first European girls-only "mathematical Olympiad" competition is being hosted by Cambridge
2003 Aug 23
1
filling a matrix who's entries are a function of the indices?
Dear R list, What's the best way in R to fill a matrix who's entries depend on some function of the indices? I'm currently doing: Q <- matrix(0, k, k) for (A in 1:k) { for (B in 1:k) { Q[A,B] <- my.function(A,B) } } but I wonder if there is a more terse way. Regards, Douglas Scofield Department of Biology d.scofield at
2017 Jun 02
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
I second this feature request (it's understandable that this and possibly other parts of the code was left behind / forgotten after the introduction of long vector). I think mean() avoids full copies, so in the meanwhile, you can work around this limitation using: countTRUE <- function(x, na.rm = FALSE) { nx <- length(x) if (nx < .Machine$integer.max) return(sum(x, na.rm =
2015 Oct 02
4
Wiki news: Build Samba, Join DCs
On 09/29/2015 01:23 PM, Rowland Penny wrote: > On 29/09/15 18:09, Steve Ankeny wrote: >> On 09/27/2015 05:48 AM, Marc Muehlfeld wrote: >>> Hello, >>> >>> during the last week I finished two documentation: >>> >>> * https://wiki.samba.org/index.php/Build_Samba_from_source >>> This page wasn't more than just a
2012 Mar 09
4
[Error Message]_gcry_ath_mutex_lock
Hi, I installed Assassin's Creed II but Ubisoft Game Launcher crash when is launched. The error message in the console is this : > Game Launcher\UbisoftGameLauncher.exe: ath.c?:193?:?_gcry_ath_mutex_lock: L'assertion ??*lock == ((ath_mutex_t) 0)?? failed. I search in bugzilla if a bug still exist (or existed) and i found this patch for the bug #25504: