Sales person performance prediction
Here is a simple way of fitting a linear model to each salesperson by week, month and quarter. You'll need to extract the week, month and quarter from the date using the lubridate package.

library(lubridate)
library(tidyverse)

#create fake data
n_var &lt;- 50
id &lt;- sample(x=seq(from=1,to=4),size=n_var,replace=TRUE)
dte &lt;- sample(seq(as.Date('2018/01/01'), as.Date('2019/01/01'), by="day"), size=n_var)
sales &lt;- runif(min=0,max=25,n=n_var)

sales_data &lt;- data.frame(id,dte,sales) %&gt;% 
  mutate(
    weeknumber=week(dte),
    month=month(dte),
    qtr=quarter(dte)

  )

#fit an OLS model
ols_model &lt;- sales_data %&gt;% 
  group_by(id) %&gt;% 
  summarise(
    week_model=list(lm(sales~weeknumber)),
    month_model=list(lm(sales~month)),
    qtr_model=list(lm(sales~qtr))
    )

#extract coefficients
ols_model$week_model[[1]]$coefficients
ols_model$month_model[[1]]$coefficients
ols_model$qtr_model[[1]]$coefficients

ols_model$week_model[[2]]$coefficients
ols_model$month_model[[2]]$coefficients
ols_model$qtr_model[[3]]$coefficients

#simple version on one id
df &lt;- sales_data %&gt;% 
  filter(id==1)

mod &lt;- lm(sales~qtr,data=df)
mod$coefficients