-
+
+
+
+Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/
+
+
+
+
+
5.1 Introduction
“Happy families are all alike; every unhappy family is unhappy in its own way.”
diff --git a/data-transform.html b/data-transform.html
index 2de77e139..5991ba60f 100644
--- a/data-transform.html
+++ b/data-transform.html
@@ -455,7 +455,17 @@
+
+
+
+Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/
+
+
+
+
+
3.1 Introduction
Visualization is an important tool for generating insight, but it’s rare that you get the data in exactly the right form you need to make the graph you want. Often you’ll need to create some new variables or summaries to answer your questions with your data, or maybe you just want to rename the variables or reorder the observations to make the data a little easier to work with. You’ll learn how to do all that (and more!) in this chapter, which will introduce you to data transformation using the dplyr package and a new dataset on flights that departed from New York City in 2013.
The goal of this chapter is to give you an overview of all the key tools for transforming a data frame. We’ll start with functions that operate on rows and then columns of a data frame, then circle back to talk more about the pipe, an important tool that you use to combine verbs. We will then introduce the ability to work with groups. We will end the chapter with a case study that showcases these functions in action and we’ll come back to the functions in more detail in later chapters, as we start to dig into specific types of data (e.g., numbers, strings, dates).
diff --git a/databases.html b/databases.html
index 28df27ac5..b6d6cb3ad 100644
--- a/databases.html
+++ b/databases.html
@@ -445,7 +445,17 @@
+
+
+
+Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/
+
+
+
+
+
21.1 Introduction
A huge amount of data lives in databases, so it’s essential that you know how to access it. Sometimes you can ask someone to download a snapshot into a .csv
for you, but this gets painful quickly: every time you need to make a change you’ll have to communicate with another human. You want to be able to reach into the database directly to get the data you need, when you need it.
In this chapter, you’ll first learn the basics of the DBI package: how to use it to connect to a database and then retrieve data with a SQL1 query. SQL, short for structured query language, is the lingua franca of databases, and is an important language for all data scientists to learn. That said, we’re not going to start with SQL, but instead we’ll teach you dbplyr, which can translate your dplyr code to the SQL. We’ll use that as a way to teach you some of the most important features of SQL. You won’t become a SQL master by the end of the chapter, but you will be able to identify the most important components and understand what they do.
@@ -563,7 +573,7 @@ diamonds_db <- tbl(con, "diamonds")
diamonds_db
#> # Source: table<diamonds> [?? x 10]
-#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:]
+#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:]
#> carat cut color clarity depth table price x y z
#> <dbl> <fct> <fct> <fct> <dbl> <dbl> <int> <dbl> <dbl> <dbl>
#> 1 0.23 Ideal E SI2 61.5 55 326 3.95 3.98 2.43
@@ -600,7 +610,7 @@ big_diamonds_db
#> # Source: SQL [?? x 5]
-#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:]
+#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:]
#> carat cut color clarity price
#> <dbl> <fct> <fct> <fct> <int>
#> 1 1.54 Premium E VS2 15002
@@ -828,7 +838,7 @@ #> Use `na.rm = TRUE` to silence this warning
#> This warning is displayed once every 8 hours.
#> # Source: SQL [?? x 2]
-#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:]
+#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:]
#> dest delay
#> <chr> <dbl>
#> 1 SFO 2.67
diff --git a/datetimes.html b/datetimes.html
index 731ff7750..b6463b45d 100644
--- a/datetimes.html
+++ b/datetimes.html
@@ -448,7 +448,17 @@
+
+
+
+::: {.callout-warning}
+Olá! Este capítulo do livro ainda **não está traduzido** para a versão Português-BR.
+ <br> Caso você queira contribuir com o projeto de tradução, leia as instruções em: <https://github.com/cienciadedatos/pt-r4ds/wiki> <br>
+A versão original (em inglês) do livro R for Data Science está disponível em: <https://r4ds.hadley.nz/>
+:::
+
+
+
17.1 Introduction
This chapter will show you how to work with dates and times in R. At first glance, dates and times seem simple. You use them all the time in your regular life, and they don’t seem to cause much confusion. However, the more you learn about dates and times, the more complicated they seem to get!
To warm up think about how many days there are in a year, and how many hours there are in a day. You probably remembered that most years have 365 days, but leap years have 366. Do you know the full rule for determining if a year is a leap year1? The number of hours in a day is a little less obvious: most days have 24 hours, but in places that use daylight saving time (DST), one day each year has 23 hours and another has 25.
@@ -458,7 +468,7 @@ 17.1.1 Prerequisites
This chapter will focus on the lubridate package, which makes it easier to work with dates and times in R. As of the latest tidyverse release, lubridate is part of core tidyverse. We will also need nycflights13 for practice data.
-
@@ -473,10 +483,10 @@ today() or now()
:
-
Otherwise, the following sections describe the four ways you’re likely to create a date/time:
@@ -489,7 +499,7 @@ 17.2.1 During import
If your CSV contains an ISO8601 date or date-time, you don’t need to do anything; readr will automatically recognize it:
-csv <- "
+csv <- "
date,datetime
2022-01-02,2022-01-02 05:12
"
@@ -618,7 +628,7 @@
+
+
+
+Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/
+
+
+
+
+
5.1 Introduction
“Happy families are all alike; every unhappy family is unhappy in its own way.”
diff --git a/data-transform.html b/data-transform.html
index 2de77e139..5991ba60f 100644
--- a/data-transform.html
+++ b/data-transform.html
@@ -455,7 +455,17 @@
+
+
+
+Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/
+
+
+
+
+
3.1 Introduction
Visualization is an important tool for generating insight, but it’s rare that you get the data in exactly the right form you need to make the graph you want. Often you’ll need to create some new variables or summaries to answer your questions with your data, or maybe you just want to rename the variables or reorder the observations to make the data a little easier to work with. You’ll learn how to do all that (and more!) in this chapter, which will introduce you to data transformation using the dplyr package and a new dataset on flights that departed from New York City in 2013.
The goal of this chapter is to give you an overview of all the key tools for transforming a data frame. We’ll start with functions that operate on rows and then columns of a data frame, then circle back to talk more about the pipe, an important tool that you use to combine verbs. We will then introduce the ability to work with groups. We will end the chapter with a case study that showcases these functions in action and we’ll come back to the functions in more detail in later chapters, as we start to dig into specific types of data (e.g., numbers, strings, dates).
diff --git a/databases.html b/databases.html
index 28df27ac5..b6d6cb3ad 100644
--- a/databases.html
+++ b/databases.html
@@ -445,7 +445,17 @@
+
+
+
+Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/
+
+
+
+
+
21.1 Introduction
A huge amount of data lives in databases, so it’s essential that you know how to access it. Sometimes you can ask someone to download a snapshot into a .csv
for you, but this gets painful quickly: every time you need to make a change you’ll have to communicate with another human. You want to be able to reach into the database directly to get the data you need, when you need it.
In this chapter, you’ll first learn the basics of the DBI package: how to use it to connect to a database and then retrieve data with a SQL1 query. SQL, short for structured query language, is the lingua franca of databases, and is an important language for all data scientists to learn. That said, we’re not going to start with SQL, but instead we’ll teach you dbplyr, which can translate your dplyr code to the SQL. We’ll use that as a way to teach you some of the most important features of SQL. You won’t become a SQL master by the end of the chapter, but you will be able to identify the most important components and understand what they do.
@@ -563,7 +573,7 @@ diamonds_db <- tbl(con, "diamonds")
diamonds_db
#> # Source: table<diamonds> [?? x 10]
-#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:]
+#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:]
#> carat cut color clarity depth table price x y z
#> <dbl> <fct> <fct> <fct> <dbl> <dbl> <int> <dbl> <dbl> <dbl>
#> 1 0.23 Ideal E SI2 61.5 55 326 3.95 3.98 2.43
@@ -600,7 +610,7 @@ big_diamonds_db
#> # Source: SQL [?? x 5]
-#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:]
+#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:]
#> carat cut color clarity price
#> <dbl> <fct> <fct> <fct> <int>
#> 1 1.54 Premium E VS2 15002
@@ -828,7 +838,7 @@ #> Use `na.rm = TRUE` to silence this warning
#> This warning is displayed once every 8 hours.
#> # Source: SQL [?? x 2]
-#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:]
+#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:]
#> dest delay
#> <chr> <dbl>
#> 1 SFO 2.67
diff --git a/datetimes.html b/datetimes.html
index 731ff7750..b6463b45d 100644
--- a/datetimes.html
+++ b/datetimes.html
@@ -448,7 +448,17 @@
+
+
+
+::: {.callout-warning}
+Olá! Este capítulo do livro ainda **não está traduzido** para a versão Português-BR.
+ <br> Caso você queira contribuir com o projeto de tradução, leia as instruções em: <https://github.com/cienciadedatos/pt-r4ds/wiki> <br>
+A versão original (em inglês) do livro R for Data Science está disponível em: <https://r4ds.hadley.nz/>
+:::
+
+
+
17.1 Introduction
This chapter will show you how to work with dates and times in R. At first glance, dates and times seem simple. You use them all the time in your regular life, and they don’t seem to cause much confusion. However, the more you learn about dates and times, the more complicated they seem to get!
To warm up think about how many days there are in a year, and how many hours there are in a day. You probably remembered that most years have 365 days, but leap years have 366. Do you know the full rule for determining if a year is a leap year1? The number of hours in a day is a little less obvious: most days have 24 hours, but in places that use daylight saving time (DST), one day each year has 23 hours and another has 25.
@@ -458,7 +468,7 @@ 17.1.1 Prerequisites
This chapter will focus on the lubridate package, which makes it easier to work with dates and times in R. As of the latest tidyverse release, lubridate is part of core tidyverse. We will also need nycflights13 for practice data.
-
@@ -473,10 +483,10 @@ today() or now()
:
-
Otherwise, the following sections describe the four ways you’re likely to create a date/time:
@@ -489,7 +499,7 @@ 17.2.1 During import
If your CSV contains an ISO8601 date or date-time, you don’t need to do anything; readr will automatically recognize it:
-csv <- "
+csv <- "
date,datetime
2022-01-02,2022-01-02 05:12
"
@@ -618,7 +628,7 @@
Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/
5.1 Introduction
“Happy families are all alike; every unhappy family is unhappy in its own way.”
diff --git a/data-transform.html b/data-transform.html index 2de77e139..5991ba60f 100644 --- a/data-transform.html +++ b/data-transform.html @@ -455,7 +455,17 @@
+
++++ +++Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
+
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/3.1 Introduction
Visualization is an important tool for generating insight, but it’s rare that you get the data in exactly the right form you need to make the graph you want. Often you’ll need to create some new variables or summaries to answer your questions with your data, or maybe you just want to rename the variables or reorder the observations to make the data a little easier to work with. You’ll learn how to do all that (and more!) in this chapter, which will introduce you to data transformation using the dplyr package and a new dataset on flights that departed from New York City in 2013.
The goal of this chapter is to give you an overview of all the key tools for transforming a data frame. We’ll start with functions that operate on rows and then columns of a data frame, then circle back to talk more about the pipe, an important tool that you use to combine verbs. We will then introduce the ability to work with groups. We will end the chapter with a case study that showcases these functions in action and we’ll come back to the functions in more detail in later chapters, as we start to dig into specific types of data (e.g., numbers, strings, dates).
diff --git a/databases.html b/databases.html index 28df27ac5..b6d6cb3ad 100644 --- a/databases.html +++ b/databases.html @@ -445,7 +445,17 @@
+
#> This warning is displayed once every 8 hours. #> # Source: SQL [?? x 2] -#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:] +#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:] #> dest delay #> <chr> <dbl> #> 1 SFO 2.67 diff --git a/datetimes.html b/datetimes.html index 731ff7750..b6463b45d 100644 --- a/datetimes.html +++ b/datetimes.html @@ -448,7 +448,17 @@++++ +++Olá! Este capítulo do livro ainda não está traduzido para a versão Português-BR.
+
Caso você queira contribuir com o projeto de tradução, leia as instruções em: https://github.com/cienciadedatos/pt-r4ds/wiki
A versão original (em inglês) do livro R for Data Science está disponível em: https://r4ds.hadley.nz/21.1 Introduction
A huge amount of data lives in databases, so it’s essential that you know how to access it. Sometimes you can ask someone to download a snapshot into a
.csv
for you, but this gets painful quickly: every time you need to make a change you’ll have to communicate with another human. You want to be able to reach into the database directly to get the data you need, when you need it.In this chapter, you’ll first learn the basics of the DBI package: how to use it to connect to a database and then retrieve data with a SQL1 query. SQL, short for structured query language, is the lingua franca of databases, and is an important language for all data scientists to learn. That said, we’re not going to start with SQL, but instead we’ll teach you dbplyr, which can translate your dplyr code to the SQL. We’ll use that as a way to teach you some of the most important features of SQL. You won’t become a SQL master by the end of the chapter, but you will be able to identify the most important components and understand what they do.
@@ -563,7 +573,7 @@
#> # Source: SQL [?? x 5] -#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:] +#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:] #> carat cut color clarity price #> <dbl> <fct> <fct> <fct> <int> #> 1 1.54 Premium E VS2 15002 @@ -828,7 +838,7 @@diamonds_db <- tbl(con, "diamonds") diamonds_db #> # Source: table<diamonds> [?? x 10] -#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1015-azure:R 4.3.2/:memory:] +#> # Database: DuckDB v0.9.1 [unknown@Linux 6.2.0-1016-azure:R 4.3.2/:memory:] #> carat cut color clarity depth table price x y z #> <dbl> <fct> <fct> <fct> <dbl> <dbl> <int> <dbl> <dbl> <dbl> #> 1 0.23 Ideal E SI2 61.5 55 326 3.95 3.98 2.43 @@ -600,7 +610,7 @@
big_diamonds_db
#> Use `na.rm = TRUE` to silence this warning
+
++++++::: {.callout-warning} +Olá! Este capítulo do livro ainda **não está traduzido** para a versão Português-BR. + <br> Caso você queira contribuir com o projeto de tradução, leia as instruções em: <https://github.com/cienciadedatos/pt-r4ds/wiki> <br> +A versão original (em inglês) do livro R for Data Science está disponível em: <https://r4ds.hadley.nz/> +:::
17.1 Introduction
This chapter will show you how to work with dates and times in R. At first glance, dates and times seem simple. You use them all the time in your regular life, and they don’t seem to cause much confusion. However, the more you learn about dates and times, the more complicated they seem to get!
To warm up think about how many days there are in a year, and how many hours there are in a day. You probably remembered that most years have 365 days, but leap years have 366. Do you know the full rule for determining if a year is a leap year1? The number of hours in a day is a little less obvious: most days have 24 hours, but in places that use daylight saving time (DST), one day each year has 23 hours and another has 25.
@@ -458,7 +468,7 @@17.1.1 Prerequisites
This chapter will focus on the lubridate package, which makes it easier to work with dates and times in R. As of the latest tidyverse release, lubridate is part of core tidyverse. We will also need nycflights13 for practice data.
-@@ -473,10 +483,10 @@
today() or
now()
:-Otherwise, the following sections describe the four ways you’re likely to create a date/time:
@@ -489,7 +499,7 @@
17.2.1 During import
If your CSV contains an ISO8601 date or date-time, you don’t need to do anything; readr will automatically recognize it:
-csv <- " +
csv <- " date,datetime 2022-01-02,2022-01-02 05:12 " @@ -618,7 +628,7 @@