Displaying 5 results from an estimated 5 matches for "x_valu".
Did you mean:
x_vals
2017 Sep 09
0
Avoid duplication in dplyr::summarise
...an of X values as function of factors f1 and f2.
library(tidyverse)
library(psych)
df <- data.frame(matrix(rnorm(40), 10, 4),
f1 = gl(3, 10, labels = letters[1:3]),
f2 = gl(3, 10, labels = letters[4:6]))
##To get all summary of your data
df%>% gather(X_name,X_value,X1:X4)%>%
group_by(f1,f2,X_name)%>%
do(describe(.$X_value))
##To obtain only means of your data
df%>% gather(X_name,X_value,X1:X4)%>%
group_by(f1,f2,X_name)%>%
do(describe(.$X_value))%>%
select(mean)%>%# You select only mean value
spread(X_name,mean)#
Vincent
Me...
2017 Sep 09
2
Avoid duplication in dplyr::summarise
Dear group,
Is there a way I could avoid the sort of duplication illustrated below?
i.e., I have the same dplyr::summarise function on different group_by
arguments. So I'd like to create a single summarise function that could be
applied to both. My attempt below fails.
df <- data.frame(matrix(rnorm(40), 10, 4),
f1 = gl(3, 10, labels = letters[1:3]),
f2 =
2017 Sep 09
1
Avoid duplication in dplyr::summarise
...d f2.
>
> library(tidyverse)
> library(psych)
> df <- data.frame(matrix(rnorm(40), 10, 4),
> f1 = gl(3, 10, labels = letters[1:3]),
> f2 = gl(3, 10, labels = letters[4:6]))
>
> ##To get all summary of your data
> df%>% gather(X_name,X_value,X1:X4)%>%
> group_by(f1,f2,X_name)%>%
> do(describe(.$X_value))
>
> ##To obtain only means of your data
> df%>% gather(X_name,X_value,X1:X4)%>%
> group_by(f1,f2,X_name)%>%
> do(describe(.$X_value))%>%
> select(mean)%>%# You select only mean va...
2008 Jul 10
2
[PATCH] tripplite driver updates
...@@ void upsdrv_initinfo(void)
int va;
long w, l;
-
/* Detect the UPS or die. */
ups_sync();
- send_cmd(":W\r", w_value, sizeof w_value);
- send_cmd(":L\r", l_value, sizeof l_value);
- send_cmd(":V\r", v_value, sizeof v_value);
- send_cmd(":X\r", x_value, sizeof x_value);
+ while (send_cmd(":W\r", w_value, sizeof w_value) < 1)
+ sleep(1);
+ while (send_cmd(":L\r", l_value, sizeof l_value) < 1)
+ sleep(1);
+ while (send_cmd(":V\r", v_value, sizeof v_value) < 1)
+ sleep(1);
+ while (send_cmd(":...
2007 Jan 04
3
problem with plot() and POSIXt dates
Hy all,
I'm plotting graphs using plot() function, they are on X axes POSIX dates:
"POSIXt" "oldClass" "POSIXct" "POSIXlt"
I can't figure out why sometimes it prints the month and days and sometimes it prints the unix timestamp.
It appens usually when the xlim is short like only some days.
xlim is settled as a POSIXt like this
"2006-12-30