Displaying 20 results from an estimated 800 matches similar to: "long format - find age when another variable is first 'high'"
2010 Oct 01
3
scoping goes wrong when some functions are used within others.
Dear,
I'm following the r tag on stackoverflow.com, and couldn't but notice
there are quite some questions popping up that deal with scoping in
relation to custom functions. I grinded my teeth on it already, and I
have absolutely no clue what goes wrong. The general pattern is as
follows :
ff <- function(x){
y <- some_value
some_function(y)
}
> ff(x)
Error in eval(expr,
2008 Dec 10
4
tapply within a data.frame: a simpler alternative?
Dear list,
I have a data.frame with x, y values and a 3-level factor "group",
say. I want to create a new column in this data.frame with the values
of y scaled to 1 by group. Perhaps the example below describes it best:
> x <- seq(0, 10, len=100)
> my.df <- data.frame(x = rep(x, 3), y=c(3*sin(x), 2*cos(x),
> cos(2*x)), # note how the y values have a different
2011 Jun 24
0
lag and diff with transformBy
I have a question regarding?the very useful doBy package, and
specifically, the transformBy() function?with the lag() and diff()
functions. ?It is often useful to lag or difference data within a
panel, i.e., within a by-group. ?Is the following code a safe use of
transformBy? Is there an alternative?
First, does the initial "orderBy" statement guarantee that the Time
order will be
2011 May 14
2
NUT: new blazer_usb subdriver proposal
Hello,
I've recently bought two cheap UPS (http://www.ldlc.com/fiche/PB00109242.html).
They're not supported natively by NUT (even though the monitoring
software is UPSilon from megatec).
After some investigation, they almost use the krauler-type
communication already supported in the blazer_usb driver. However, the
UPS won't reply if the language ID is not 0x4095...
Therefore, I
2009 Feb 03
3
lapply and aggregate function
Dear list,
I have two things I am struggling...
# First
set.seed(123)
myD <- data.frame( Light = sample(LETTERS[1:2], 10, replace=T),
Feed = sample(letters[1:5], 20, replace=T),
value=rnorm(20) )
# Mean for Light
myD$meanLight <- unlist( lapply( myD$Light,
function(x) mean( myD$value[myD$Light == x]) ) )
# Mean for Feed
2009 Jul 08
1
Problem with 1.2 and sieve: failed with unsuccessful implicit keep
Hi,
First, thanks for this awesome piece of software.
I've just upgraded to latest dovecot, aka 1.2.
I've a problem. I've started using Sieve, and everything works fine, I
already received a thousand of mails without any problem.
However, there's one mail which is stuck in the postfix queue because of
that:
Jul 8 18:47:51 prometheus dovecot: deliver(jd at danjou.info):
2011 Dec 17
1
[nut-commits] svn commit r3363 - in trunk: data docs/man drivers
On Dec 17, 2011, at 3:53 AM, Arnaud Quette wrote:
> Author: aquette
> Date: Sat Dec 17 08:53:41 2011
> New Revision: 3363
> URL: http://trac.networkupstools.org/projects/nut/changeset/3363
>
> Log:
> Try to fix language ID support for USB units from LDLC, Dynamix and no names in blazer_usb (reworked patch, from Brian R. Smith and Aur?lien Grenotton)
...
> + if
2009 Jan 07
12
glusterfs alternative ? :P
I know that this is not the appropriate place :). You know someone can
alternative to gluserfs ?:)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20090107/63b68a0d/attachment.html>
2011 Aug 12
2
recode Variable in dependence of values of two other variables
Hi,
as an R-beginner, I have a recoding problem and hope you can help me:
I am working on a SPSS dataset, which I loaded into R (load("C:/...)
I have 2 existing Variables: "ID" and "X" ,
and one variable to be computed: meanX.dependID (=mean of X for all rows
in which ID has the same value)
ID = subject ID. Since it is a longitudinal dataset, there are repeated
2005 Feb 24
2
survreg with gamma distribution: re-post
Dear r-help subscribers,
A couple of weeks ago I sent the following message to the r-help mail
list. It hasn't generated any response, and I could really use some help
on this. Anyone able to help?
Thanks again,
Roger Dungan
>>
I am working on some survival analysis of some interval censored failure
time data in R. I have done similar analysis before using PROC LIFEREG
in SAS. In
2006 Apr 17
7
help
Hi, I am trying to runn a age-period-cohort model, but here is what I am
having problem with, hope you can help me!
This is what I am trying to do:
sumzero_a<-((A-min(A))/5+1) - mean((A-min(A))/5+1) where A is my age
variable (numeric, the mid-point of a five-year age group), but I got the
following error:
Error in min(..., na.rm = na.rm) : invalid 'mode' of argument
I am pretty
2006 Apr 25
4
Help needed
Hi,
I am trying to change a SAS macro to R.
here is my code. I get an error at the last line.
attach(fram)
dset1<-cbind(AGE,BMI,DEATH)
> BMIGRP<-cut(BMI,breaks=3,right=TRUE)
> AGEGRP<-floor(AGE/10)-2
> dset<-cbind(AGEGRP,BMIGRP,DEATH)
> maxage<-max(dset[,1])
> minage<-min(dset[,1])
> #maxcls<-dset[,2]
> #mincls<-dset[,2]
>
2008 Sep 05
8
Gluster update | need your support
Dear Members,
Even though Gluster team is growing at a steady phase, our aggressive development
schedule out phases our resources. We need to expand and also maintain a 1:1 developer /
QA engineer ratio. Our major development focus in the next 8 months will be towards:
* Large scale regression tests (24/7/365)
* Web based monitoring and management
* Hot upgrade/add/remove of storage nodes
2010 Apr 27
5
get means of elements of 5 matrices in a list
I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a
5 x 6 matrix that contains the mean value of the 5 original matrices. I can
do this by brute force, but there must be a better way than making each
matrix into a vector and then remaking a matrix
thanks very much for any help
david freedman
ll=list(structure(c(9.7, 17.6, 20.8, 24.1, 33.8, 14.5, 25.7, 29.8,
2008 Jul 20
2
fill in area between 2 lines with a color
Hi - I'd like to have the area between 2 lines on a x-y plot be filled with
grey, but I haven't had
any luck using polygon or rect. (In reality, I'd like to do this for twice
- once for a low group and once for a high group - and then I'd like to plot
a set of data points for a 'normal' group together with these 2 grey areas.)
Here's a simple example of the 2 lines:
2010 Nov 29
3
data.frame and formula classes of aggregate
Hi - I apologize for the 2nd post, but I think my question from a few weeks
ago may have been overlooked on a Friday afternoon.
I might be missing something very obvious, but is it widely known that the
aggregate function handles missing values differently depending if a data
frame or a formula is the first argument ? For example,
(d<- data.frame(sex=rep(0:1,each=3),
2010 Feb 06
4
Plot of odds ratios obtained from a logistic model
Hi all!
I am trying to develop a plot a figure in which I would like to show
the odds ratios obtained from a logistic model. I have tried with the
dotplot option but no success. Could you help me? Is there any option
when modelling the logistic model in R?
Thank you in advance
2011 Jan 17
2
Using summaryBy with weighted data
Dear Soren and R users:
I am trying to use the summaryBy function with weights. Is this possible? An example that illustrates what I am trying to do follows:
library(doBy)
## make up some data
response = rnorm(100)
group = c(rep(1,20), rep(2,20), rep(3,20), rep(4,20), rep(5,20))
weights = runif(100, 0, 1)
mydata = data.frame(response,group,weights)
## run summaryBy without weights:
2010 May 06
4
sample size for survival curves
Dear R users, I am not asking questions specifically on R, but I know there are many statistical experts here in the R community, so here it goes my questions:
Freedman (1982) propose an approximation of sample size/power calculation based on log-rank test using the formula below (This is what nQuery does):
(Z(1-?/side)+Z(power))^2*(hazard.ratio+1)^2
N =
2015 Feb 17
2
Help with archive server
Hi,
I want to build a system where 6 months old mail to be moved to
archive server to keep my mailbox clean and fast.
Is there any way to achieve the same using any pre-built binary shipped
with dovecot ?
Thanks and Regards
Joy