Has this happened to anyone, I was recently using it just fine. The pipe function was working just fine. Then all of a sudden R starts to slow down and it stops working completely. Provides me with a could not find function "%>%" Error which does not make sense since I was just using it. I have closed R reloaded packages and still nothing.
Packages and Libraries are of the following:
`install.packages("tidyverse")
install.packages("magrittr")
library("dplyr")
library("readr") library("lubridate")
library("tidyr")
library("stringr")
library("tidyverse")
Code chunk:
heartrate_sec<-data.frame(
Id =c(336,339,342),
Time=c(4/12/2016 7:21:00 AM, 4/12/2016 7:21:05 AM,4/12/2016
7:21:10 AM)
new_heartrate <- heartrate_sec %>% separate(Time
,c("date","time"),sep=" ", extra="merge")
The way I understood this was this will allow me to separate the column "Time" into
date =c(4/12/2016,4/12/2016,4/12/2016)
time =c(7:21:00 AM, 7:21:05 AM, 7:21:10 AM)
Where extra="merge" will merge the AM or anything else that is not time and date
But unfortunately, that didn't work so I received the following error
Error in heartrate_sec %>% separate(Time, c("date", "time"), sep = " ", : could not find function "%>%"
When I tried it in both cloud R and in a new project based on my desktop version of R and proceeded to run the entire code chunk again but with a time format.
heartrate_sec %>% separate(Time,c("Date","Time"),sep=" ",extra
= "merge") %>% mutate(out = format(Time, format="%H:%M:%S"))
I received the same thing now with an R Session Aborted R encountered a fatal error. The session was terminated.
I do want to point out that I have tried this code chunk previously and it worked just fine before but now I am a bit clueless as to what is wrong I hope I have explained it correctly. I am fairly new to R so please bear with me.