Upload R project/Rmarkdown to kaggle

Then did you replace sleep with minute in the group_by?

I didn't and here is my mistake I guess, right?

Haven't tried it yet, but think so. What do you see? (I hate it when this happens to me.)

sorry for late replay, I was at work. I solved it finally, thank you very much! The command to change the column name was after the group_by. but when you mentioned replacing sleep with minute It was very clear then! Thanks again :slight_smile:

But I have another problem in the same section, I don't get any error but when I give command to merge sleep with minute table, it says (Joining, by = c("Id", "ActivityMinute") but I can't find it in minute table. all the others are in minute table, I even calculated heart rate from seconds to minute and added to the table, but sleep is no way to be shown. do you know why?

By minute

calories_narrow <- read.csv( "minuteCaloriesNarrow_merged.csv")
intensities_narrow <- read.csv( "minuteIntensitiesNarrow_merged.csv")
steps_narrow <- read.csv("minuteStepsNarrow_merged.csv")
sleep <- read.csv( "minuteSleep_merged.csv")
met <- read.csv("minuteMETsNarrow_merged.csv")

minute <- left_join(calories_narrow,intensities_narrow)
Joining, by = c("Id", "ActivityMinute")
minute <- left_join(minute,steps_narrow)
Joining, by = c("Id", "ActivityMinute")
minute <- left_join(minute,met)
Joining, by = c("Id", "ActivityMinute")

rm(calories_narrow,intensities_narrow,steps_narrow,met)

colnames(sleep)[2] <- "ActivityMinute"
sleep %>% group_by(Id,ActivityMinute) %>% count() %>% View()

sleep <- sleep %>% unique()
minute <- left_join(minute,sleep)
Joining, by = c("Id", "ActivityMinute")>

With a a reprex. See the FAQ I can help untangle this. Missing

1 Like

Thank you very much for your help!