Question: `$table->text('company_logo')->nullable();`

I'm trying to create a migration to store Base 64 Encoded image in my My SQL database. I'm not if what I have is good enough. 

Is what I have good enough ? How do I know it ?

Answer: 
You can also use the `dplyr` package to aggregate the data:

```
library(dplyr)
mean_data <- group_by(data, gender, week) %>%
             summarise(motivation = mean(motivation, na.rm = TRUE))

```

You can use `na.omit()` to get rid of the `NA` values as follows:

```
library(ggplot2)
ggplot(na.omit(mean_data), aes(x = week, y = motivation, colour = gender)) +
  geom_point() + geom_line()

```

[![enter image description here](https://i.stack.imgur.com/F7IHh.png)](https://i.stack.imgur.com/F7IHh.png)

There is no need here to explicitly use the `group` aesthetic because `ggplot` will automatically group the lines by the categorical variables in your plot. And the only categorical variable you have is `gender`. (See [this answer](https://stackoverflow.com/a/10358388/4303162) for more information).
Another possibility is using `stat_summary`, so you can do it only with **ggplot**.

```
ggplot(data = DataRlong, aes(x = week, y = motivation, group = gender)) + 
   stat_summary(geom = "line", fun.y = mean)

```