I would like to know if there is another way to write my database below. Note that I am entering twice Segunda
, twice Terca
, twice Quarta
, and so on in D1
. What I mean is that Segunda
is the same as segunda
or segunda-feira
. But I didn't want to have to repeat Segunda
twice, for example, in D1
. Is there another way to encode this?
dayinportugues <- data.frame(
D1 = c("Segunda", "Segunda", "Terca", "Terca","Quarta","Quarta", "Quinta", "Quinta", "Sexta","Sexta", "Sabado", "Domingo"),
D2 = c("segunda", "segunda-feira","terca","terça-feira", "quarta","quarta-feira", "quinta","quinta-feira", "sexta","sexta-feira", "sabado", "domingo"))
> dayinportugues
D1 D2
1 Segunda segunda
2 Segunda segunda-feira
3 Terca terca
4 Terca terça-feira
5 Quarta quarta
6 Quarta quarta-feira
7 Quinta quinta
8 Quinta quinta-feira
9 Sexta sexta
10 Sexta sexta-feira
11 Sabado sabado
12 Domingo domingo