[R] Dplyr question
Ebert,Timothy Aaron
tebert @end|ng |rom u||@edu
Tue Jun 21 18:36:14 CEST 2022
I do not see how to do this with exclusively dplyr commands. I might be able to make it work by including commands outside of dplyr, but at that point I would use pivot_longer() from the tidyr package.
Tim
-----Original Message-----
From: R-help <r-help-bounces using r-project.org> On Behalf Of Thomas Subia
Sent: Tuesday, June 21, 2022 12:23 PM
To: r-help using r-project.org
Subject: [R] Dplyr question
[External Email]
Colleagues:
The header of my data set is:
Time_stamp P1A0B0D P190-90D
Jun-10 10:34 -0.000208 -0.000195
Jun-10 10:51 -0.000228 -0.000188
Jun-10 11:02 -0.000234 -0.000204
Jun-10 11:17 -0.00022 -0.000205
Jun-10 11:25 -0.000238 -0.000195
I want my data set to resemble:
Time_stamp Location Measurement
Jun-10 10:34 P1A0B0D -0.000208
Jun-10 10:51 P1A0B0D -0.000228
Jun-10 11:02 P1A0B0D -0.000234
Jun-10 11:17 P1A0B0D -0.00022
Jun-10 11:25 P1A0B0D -0.000238
Jun-10 10:34 P190-90D -0.000195
Jun-10 10:51 P190-90D -0.000188
Jun-10 11:02 P190-90D -0.000204
Jun-10 11:17 P190-90D -0.000205
Jun-10 11:25 P190-90D -0.000195
I need some advice on how to do this using dplyr.
V/R
Thomas Subia
FM Industries, Inc. - NGK Electronics, USA | https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fmindustries.com&d=DwIFAg&c=sJ6xIWYx-zLMB3EPkvcnVg&r=9PEhQh2kVeAsRzsn7AkP-g&m=2wtqsRoT5-Y52Nm7oSjNuHNQHkSq2Eau1NqsSFofmKxuHYYVfjvnWxMdz4-ihkH_&s=wC7lz5W60gl0hAYdOMsXi6BiQ7LmX1r-vSkIHY_78IY&e=
221 Warren Ave, Fremont, CA 94539
"En Dieu nous avons confiance, tous les autres doivent apporter des donnees"
______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=DwIFAg&c=sJ6xIWYx-zLMB3EPkvcnVg&r=9PEhQh2kVeAsRzsn7AkP-g&m=2wtqsRoT5-Y52Nm7oSjNuHNQHkSq2Eau1NqsSFofmKxuHYYVfjvnWxMdz4-ihkH_&s=Xb1jmlqPlfkqfb6U6vZjMhHn0dWhTZ_Tj-k4ZHpGXFY&e=
PLEASE do read the posting guide https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=DwIFAg&c=sJ6xIWYx-zLMB3EPkvcnVg&r=9PEhQh2kVeAsRzsn7AkP-g&m=2wtqsRoT5-Y52Nm7oSjNuHNQHkSq2Eau1NqsSFofmKxuHYYVfjvnWxMdz4-ihkH_&s=D8A_JX8FXGErCjS4rD4k9S200L_F33HHrt0jIKJdRGM&e=
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list