As suggested, understanding the structure of your data frame would be a great first step.
Perhaps the "Tydzien" variable was read from original csv was into a character or factor or some other format.
Since you haven't provided a reprex (reproducible example), I will attempt to work what you you have shared here. For illustration, lets say that your data looks something like this:
dane_sample <- data.frame(Tydzien = c("2015-02-02", "2015-02-09", "2015-02-16", "2015-02-23", "2015-03-02"),
X50StyleAUnisexABP = c(189, 191, 172, 205, 211))
The structure of that data frame looks like this:
> str(dane_sample)
'data.frame': 5 obs. of 2 variables:
$ Tydzien : Factor w/ 5 levels "2015-02-02","2015-02-09",..: 1 2 3 4 5
$ X50StyleAUnisexABP: num 189 191 172 205 211
Notice that the Tydzien variable in this example is a factor.
One option for you: utilize "mutate" function from the dplyr package to transform the this variable into a date format. Something like this:
library(tidyverse)
dane_modified <- dane_sample %>%
mutate(Tydzien_modified = as.Date(Tydzien))
dane_modified
> dane_modified
Tydzien X50StyleAUnisexABP Tydzien_modified
1 2015-02-02 189 2015-02-02
2 2015-02-09 191 2015-02-09
3 2015-02-16 172 2015-02-16
4 2015-02-23 205 2015-02-23
5 2015-03-02 211 2015-03-02
> str(dane_modified)
'data.frame': 5 obs. of 3 variables:
$ Tydzien : Factor w/ 5 levels "2015-02-02","2015-02-09",..: 1 2 3 4 5
$ X50StyleAUnisexABP: num 189 191 172 205 211
$ Tydzien_modified : Date, format: "2015-02-02" "2015-02-09" "2015-02-16" "2015-02-23" ...
Notice that the newly created "Tydzien_modified" variable is now in a "Date" format.
I hope this makes sense.