Displaying 3 results from an estimated 3 matches for "colusions".
Did you mean:
colisions
2011 Jul 27
1
how to replace values in x by means in subgroups created in ... (not loops)
...# we do not want use loops we do not use apply (not very fast)
x <-c(0 ,1,2,3,4,5,6,7,8,NA,NA,1 ,1 ,NA,2 ,2)
y <-c(0 ,0,0,1,0,0,0,1,1,1 ,NA,0 ,0 ,0 ,0 ,1)
Must_be<-c(1 ,1,1,3,5,5,5,7,8,NA,NA,1.5,1 ,NA,1.5,2)
(df<-as.data.frame(cbind(x,y)) )
# I have traied many bad colusions based on cumsum, pmin, pmax, ...
(mean_dfx_if_yIs0<-y*cumsum(x*y)/(cumsum(y)*y) )
# how to do this?
# thans for any advice
# E
[[alternative HTML version deleted]]
2023 Oct 30
1
Missing shapes in legend with scale_shape_manual
Hello,
I'm trying to plot a graph of blood glucose versus date. I also record
conditions, such as missing the previous night's medications, and
missing exercise on the previous day. My data looks like:
> b2[68:74,]
# A tibble: 7 ? 5
Date Time bg missed_meds no_exercise
<date> <time> <dbl> <lgl> <lgl>
1 2023-10-17 08:50
2011 Jul 28
0
_: how to replace values in x by means in subgroups created in ...(not loops)
...gt;
>> x <-c(0 ,1,2,3,4,5,6,7,8,NA,NA,1 ,1 ,NA,2 ,2)
>> y <-c(0 ,0,0,1,0,0,0,1,1,1 ,NA,0 ,0 ,0 ,0 ,1)
>> Must_be<-c(1 ,1,1,3,5,5,5,7,8,NA,NA,1.5,1 ,NA,1.5,2)
>>
>> (df<-as.data.frame(cbind(x,y)) )
>>
>> # I have traied many bad colusions based on cumsum, pmin, pmax, ...
>> (mean_dfx_if_yIs0<-y*cumsum(x*y)/(cumsum(y)*y) )
>>
>> # how to do this?
>> # thans for any advice
>> # E
[[alternative HTML version deleted]]