Skip to content

Commit

Permalink
Update 04-01-creating_log_files_manually.md with more human readable …
Browse files Browse the repository at this point in the history
…text

Also correct that the order is important.
  • Loading branch information
larsvilhuber authored Dec 19, 2024
1 parent 1131e27 commit ad3190f
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions 04-01-creating_log_files_manually.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,17 @@ sink()
close(globallog)
```

### Using `tidylog` for logging data manipulations in R
**Using `tidylog` for logging data manipulations in R**

To install `tidylog`, you can add it to your `requirements.txt` file or install it directly in your R script:
You can use [`tidylog`](https://cran.r-project.org/web/packages/tidylog/readme/README.html) to monitor `tidy` and `dplyr` data manipulations. It needs to be loaded after the relevant packages, as it redefines some of their commands.

```R
install.packages("tidylog")
```

Here is an example of using `tidylog` to log data manipulations:
Sample code:

```R
library(tidylog)
#install.packages("tidylog")
library(dplyr)
library(tidylog)


# Example data manipulation
data <- data %>%
Expand All @@ -62,7 +60,6 @@ data <- data %>%
summarize(mean_value = mean(new_variable, na.rm = TRUE))
```

In this example, `tidylog` will automatically log the data manipulations performed by the `dplyr` functions, making it easier to track and understand the changes made to your data.

:::

Expand Down

0 comments on commit ad3190f

Please sign in to comment.