>
>-Original Message-
>From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us]
>Sent: 10 July 2017 03:52 PM
>To: r-help@r-project.org; Mangalani Peter Makananisa;
>r-help@r-project.org
>Cc: Vito Ricci (vito_ri...@yahoo.com)
>Subject: Re: [R] dplyr help
>
>I
t;, "360", "420", "480"
), class = "factor")), .Names = c("pokus", "minuty"), row.names = c(NA, -23L),
class = "data.frame")
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Be
@r-project.org
Cc: Vito Ricci (vito_ri...@yahoo.com)
Subject: Re: [R] dplyr help
I am pretty sure that this is not a question about dplyr... it is a question
about tidyr. Look at the help file ?tidyr::spread.
If I understand your question (I may not, because you gave no example of
input/output
I am pretty sure that this is not a question about dplyr... it is a question
about tidyr. Look at the help file ?tidyr::spread.
If I understand your question (I may not, because you gave no example of
input/output data), the answer is no, the column names come from the column
named by the key
;
), class = "factor")), .Names = c("pokus", "minuty"), row.names = c(NA,
-23L), class = "data.frame")
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Mangalani
> Peter Makananisa
> Sen
HI all,
Is it possible to use one column spread on multiple columns values.
example
spread( Key_col, value1:value7)
spreading Key_col to variable value1, value2, ... Value7
Please advise,
Kind regards
Mangalani Peter Makananisa (5786)
South African Revenue Service (SARS) - HO
+2782 456
Hello,
I've recently discovered the helpful dplyr package. I'm using the
'aggregate' function as such:
bevs - data.frame(cbind(name = c(Bill, Mary), drink = c(coffee,
tea, cocoa, water), cost = seq(1:8), sex = c(male,female)));
bevs$cost - seq(1:8)
bevs
name drink costsex
1 Bill
Hi Brian,
Thanks for the suggestion, although the command is throwing an error as
such:
bevs %% group_by(name, sex, drink) %% summarise( cost = sum(cost)) %%
select(name, drink, cost, sex)
Error: unexpected input in bevs %% group_by(name, sex, drink) %%
summarise(
Your syntax is new to me
David,
I do appreciate your help, if not the dose of contempt. I hope you
feel OK.
Thanks for the tips,
-Jonathan
On Wed, Jul 29, 2015 at 11:14 PM, David Winsemius dwinsem...@comcast.net
wrote:
On Jul 29, 2015, at 7:37 PM, Jon BR wrote:
Hello,
I've recently discovered the helpful
dplyr solution:
bevs %% group_by(name, sex, drink) %% summarise(cost = sum(cost)) %%
select(name, drink, cost, sex)
The last select statement puts the output in the column order you wanted in
your result.
I hope this helps.
Brian
On Wed, Jul 29, 2015 at 9:37 PM, Jon BR jonsle...@gmail.com
On Jul 29, 2015, at 7:37 PM, Jon BR wrote:
Hello,
I've recently discovered the helpful dplyr package. I'm using the
'aggregate' function as such:
The `aggregate` function is part of base-R:
bevs - data.frame(cbind(name = c(Bill, Mary), drink = c(coffee,
tea, cocoa, water), cost =
11 matches
Mail list logo