Displaying 20 results from an estimated 5000 matches similar to: "weighed mean of a data frame row-by-row"
2006 Aug 31
0
Weighed 2D kernel density estimator
Is there a function/package that performs weighted 2D density
estimates? I haven't found anything searching with those keywords,
but perhaps there is a more general algorithm that I should be looking
for.
Any hints appreciated. Thanks,
Hadley
2009 Sep 21
2
How to handle missing values for the GeneMeta package?
Hello all,
It seems that the GeneMeta passage returns NA in the respective row if
any gene in the data sets to be synthesised are missing. Do you know
of a way to overcome this problem?
I tried using the 'impute' package to fill-in the missing values, but
R crashes if 'impute' and 'GeneMeta' packages are used together. I
have asked a separate question for that.
Thanks
2018 Feb 16
0
weighed Fleming-Harrington log rank test
You are correct that the survreg routine only supports 'rho' of the Fleming-Harrington G-rho tests. This is a function of age -- I wrote the original code back when I was working with Tom (Fleming), and he was only using 1 parameter. Later he and David expanded the test to two parameters. This might be only the second request for the feature in the 30+ years since that date.
Terry
2018 Feb 16
0
weighed Fleming-Harrington log rank test
Thank you Terry. Right now I can use comp() from survMisc package to do the 2-parameter version of F-H weighting. I think both SAS and stata offer the 2-parameter version, so just?thought it would be nice if survdiff() can have that option given it's standard package in R.?
Thanks!
John
On Friday, February 16, 2018, 7:08:46 AM PST, Therneau, Terry M., Ph.D. <therneau at mayo.edu>
2010 Dec 15
2
Can the by() function return a single column?
I would like to de-mean the 'vector' column of the following dataframe by
factor:
set.seed(5444)
vector <- rnorm(1:10)
factor <- rep(1:2,5)
test.df <- data.frame(factor, vector)
which is:
factor vector
1 1 -0.4963935
2 2 -2.0768182
3 1 -1.5822224
4 2 0.8025474
5 1 0.3504199
6 2 0.2358464
7 1 -0.3989443
8 2 -0.3692544
9
2016 Sep 08
2
blazer_usb MEC0002 problem Fry's Electronics (Turbo-X) [HID PDC?]
> You could also try adding "-x usb_set_altinterface" to the command line
> (or adding it to ups.conf). The lsusb output implies that the only valid
> setting is 0 (bAlternateSetting), but it might need to be set explicitly.
I checked with -x usb_set_altinterface and it says
nut_usb_set_altinterface: usb_set_altinterface() should not be
necessary - please email the
2016 Sep 15
2
blazer_usb MEC0002 problem Fry's Electronics (Turbo-X) [HID PDC?]
Hi again,
> On Sep 8, 2016, at 10:05 AM, Vassilis Virvilis <vasvir at iit.demokritos.gr>
> wrote:
>> Now that's a problem. I am not sure that I can find
>>
>> 1) the original software
>> 2) a (physical) windows machine in the vicinity of the UPS
>>
Ha!
I jumped several hooks but I think I got it.
01. I contacted the store that sold us the UPS and
2005 Jan 09
2
X100P random hangups - Please help with suggestions
Thanks for the reply Bill.
I am aware of the interrupts problem. To solve it I have already disabled
my serial ports freeing up interrupts 3 and 4 and these are allocated to
the two cards. This was done 2 months ago and has not solved the problem.
Is there any way that something can wake up every now and then and generate
these two interrupts? My current /proc/interrupts is as follows:
2004 Jul 04
1
Using call redirection numbers
Hello everybody,
I am trying to setup asterisk to redirect international calls via a carrier
which uses a fixed price tel number. The scenario is
Dial 087..something (UK number)
Pause for answer at the other end
Send required telephone number 003..etc followed by #
What is the easiest way of doing this? I have trouble with both the pause
and adding the # at the end of the number.
Best
2009 Sep 21
2
R crashes when packages 'impute' and 'GeneMeta' are used together.
Well, the title says all for this one. It seems to crash the
R-console, so it happens whether I use the R-gui or R-console directly
or Emacs with ESS.
I have R 2.9.0 on Windows Vista.
Thanks,
Vassilis
2013 Feb 06
1
weighing proportion of rowSums in dataframe
Dear R-List,
I am sure there must be a very simple way to do this - I just do not know how...
This is what I want to do:
#my dataframe
df<-data.frame(id=c("x01","x02","x03","x04","x05","x06"),a=c(1,2,NA,4,5,6),b=c(2,4,6,8,10,NA),c=c(NA,3,9,12,NA,NA),sum=c(3,9,15,24,15,6))
id a b c sum
1 x01 1 2 NA 3
2
2016 Sep 16
2
blazer_usb MEC0002 problem Fry's Electronics (Turbo-X) [HID PDC?]
A little deciphering
> Looks like the ups always replies
> 22 = 16035500 50005300 20004e00 6f002000 41006300 6b00
That is
length = 0x16 = 22
type = 0x3 = string
Message = "UPS No Ack"
Very fun...
Regards
Vassilis Virvilis
2004 Aug 19
2
False Hangups on Asterisk
I have an asterisk server running on Redhat 8.0 with a Digium TDM400P
w/4 FXO modules (TDM04P)
There are 2 lines going into the Digium card. One line is a Vonage
digital line, and the other line is a Comcast voice line. I have a SIP
Grandstream 100 phone connected to the Asterisk server. I also have IAX
configured with FWD.
The problem is that on occasionally, after talking for about 20
2005 May 23
3
module-init-tools ported to klibc
Halo,
I don't know if this is already done but the following two patches (one
for klibc) and a big one (several smaller incorporated to one) to
modules-init-tools enables running modprobe and friends in early user space.
There are some issues so I post here for discussion
The porting strategy was copied from the udev package. I make a file
mod_libc_wrapper.{c,h} in order to provide the
2008 Oct 14
2
Multiple maildirs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Is is possible to specify multiple maildir location in mail_location?
(default_mail_env in my case since I'm using version 1.0.rc15/debian etch).
What I want to achieve is receive mail in /var/spool/mail, which is
going to contain 1 Maildir per user, and have /home/%u/Maildir/ to store
(move) messages from spool location. Postfix is taking care
2009 Sep 21
9
Handling missing data
I have to remove missing data both in character and numeric datatype.I tried
using NA condition but it is not working ,please help me to solve this.
--
View this message in context: http://www.nabble.com/Handling-missing-data-tp25530192p25530192.html
Sent from the R help mailing list archive at Nabble.com.
2013 Apr 25
1
Weighted Principle Components analysis
Hello!
I am doing Principle Componenets Analysis using "psych" package:
mypc<-principal(mydata,5,scores=TRUE)
However, I was asked to run a case-weighted PCA - using an individual
weight for each case.
I could use "corr" from "boot" package to calculate the case-weighed
intercorrelation matrix. But if I use the intercorrelation matrix as input
(instead of the
2002 Oct 31
3
Loess with glm ?
Hello,
I am wondering if there is an easy way to combine loess() with glm()
to produce a locally fitted generalised regression.
I have a data set of about 5,000 observations and 5 explanatory variables,
with a binary outcome. One of the explanatory variables (lets call it X)
is much more predictive than the others. A single glm() regression over
the entire data set produces rather poor results,
2010 Jul 20
1
Servreg $loglik
Dear R-experts:
I am using survreg() to estimate the parameters of a Weibull density having
right-censored observations. Some observations are weighted. To do that I
regress the weighed observations against a column of ones.
When I enter the data as 37 weighted observations, the parameter estimates
are exactly the same as when I enter the data as the corresponding 70
unweighted observations.
2011 Oct 18
2
About an integral univariate problem
Hello all R users
I want to calculate this univariate integral:
exp(-x)*sum(y^x) respect to x from 0 to 3 where y is a vector y=(2,3,5).
In fact, the original y vector has a large number of elements but I propose
with 3 elements.
I know that I can resolve this problem doing
fun <- function(x) exp(-x)*(2^x+3^x+5^x)
integrate(fun,0,3)
When the y vector has a large number of elements the