Error in : argument "x" is missing, with no default

I'm attempting to set up a new data frame with new and existing columns however I am getting the error message.

Active_Inactive <-(Daily_Activities_dailyActivity_merged%>% ActiveMin<-rowSums(,11:13)%>% select("Id","ActivityDate","SedentaryMinutes","ActiveMin"))

Read this as Active_Inactive equals the result enclosed in the outer () of sending Daily_Activities_dailyActivity_merged from the "left' to ActiveMin while, at the same time, sending rowSums of three columns of something to select the four variables in the select statement either before or after sending it to ActiveMin from the right.

That is trying to go barefoot with shoes on.

Step back and think of the problems in terms of school algebra—f(x) = y, where x is the existing data frame, y is the desired data frame and f is a function (probably composite) to transform x into y.

Start by classifying the variables in the x data frame into three buckets:

  1. Those to appear in y but not needed to create new variables in y
  2. Those needed to create new variables in y
  3. Those unneeded for either

Set aside 1, get rid of 3 and use 2 to get your new variables. Combine 1 and the new variables.

For a more specific answer, provide a reprex. See the FAQ.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.