You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`generate_dictionary()`: This function is designed to automatically create a comprehensive data dictionary from labelled datasets. The generated dictionary provides detailed insights into each variable, aiding in better data understanding and management.
5
+
*`generate_dictionary()`: This function is designed to automatically create a comprehensive data dictionary from labelled datasets. The generated dictionary provides detailed insights into each variable, aiding in better data understanding and management.
8
6
9
-
-`look_for()`: This enhances the capability to efficiently search within labelled datasets. It allows users to quickly find variable names and their descriptions by searching for specific keywords. This feature streamlines data exploration and analysis, particularly in large datasets with extensive variables.
7
+
*`look_for()`: This enhances the capability to efficiently search within labelled datasets. It allows users to quickly find variable names and their descriptions by searching for specific keywords. This feature streamlines data exploration and analysis, particularly in large datasets with extensive variables.
10
8
11
9
These enhancements aim to improve the user experience in data management and exploration within `bulkreadr`. We hope these new features will assist our users in more effectively navigating and understanding their labelled datasets.
12
10
13
-
##bulkreadr 1.0.0 (2023-09-20)
11
+
# bulkreadr 1.0.0 (2023-09-20)
14
12
15
13
This update includes the following new features and improvements:
16
14
17
-
- Developed `read_stata_data()` to import Stata data file (`.dta`) into an R data frame, converting labeled variables into factors.
15
+
* Developed `read_stata_data()` to import Stata data file (`.dta`) into an R data frame, converting labeled variables into factors.
18
16
19
-
- Reduced dependency packages to optimize efficiency.
17
+
* Reduced dependency packages to optimize efficiency.
20
18
21
19
22
-
##0.2.0 (2023-09-11)
20
+
# 0.2.0 (2023-09-11)
23
21
24
22
This update includes the following new features and improvements:
25
23
26
-
- Developed bulkreadr vignette
24
+
* Developed bulkreadr vignette
27
25
28
-
- Developed `read_spss_data()` to seamlessly import data from an SPSS data (`.sav` or `.zsav`) files and converting labelled variables into factors, a crucial step that enhances the ease of data manipulation and analysis within the R programming environment.
26
+
* Developed `read_spss_data()` to seamlessly import data from an SPSS data (`.sav` or `.zsav`) files and converting labelled variables into factors, a crucial step that enhances the ease of data manipulation and analysis within the R programming environment.
29
27
30
-
- Added more unit tests
28
+
* Added more unit tests
31
29
32
-
##0.1.0 (2023-07-24)
30
+
# 0.1.0 (2023-07-24)
33
31
34
32
This update includes the following new features and improvements:
35
33
36
-
- Improved error handling by adding meaningful error messages for all functions within `bulkreadr` package. This will make it easier for users to identify and troubleshoot issues that may arise during their use of the package.
34
+
* Improved error handling by adding meaningful error messages for all functions within `bulkreadr` package. This will make it easier for users to identify and troubleshoot issues that may arise during their use of the package.
37
35
38
-
- Added package-level documentation. The user can now use `?bulkreadr::bulkreadr` for basic package-level documentation.
36
+
* Added package-level documentation. The user can now use `?bulkreadr::bulkreadr` for basic package-level documentation.
39
37
40
-
- Added `inspect_na()` to summarize missingness in data frame columns and `fill_missing_values()` to impute missing values in a dataframe.
38
+
* Added `inspect_na()` to summarize missingness in data frame columns and `fill_missing_values()` to impute missing values in a dataframe.
41
39
42
-
##0.0.0.9 (2023-07-03)
40
+
# 0.0.0.9 (2023-07-03)
43
41
44
42
The development version of bulkreadr is now on Githhub.
[](https://app.codecov.io/gh/gbganalyst/bulkreadr?branch=main)
30
31
<!-- badges: end -->
@@ -75,306 +76,6 @@ library(dplyr)
75
76
```
76
77
77
78
78
-
## Functions in bulkreadr package
79
-
80
-
This section provides a concise overview of the different functions available in the `bulkreadr` package. These functions serve various purposes and are designed to handle importing of data in bulk.
> For the majority of functions within this package, we will utilize data stored in the system file by the `bulkreadr`, which can be accessed using the `system.file()` function. If you wish to utilize your own data stored in your local directory, please ensure that you have set the appropriate file path prior to using any functions provided by the bulkreadr package.
95
-
96
-
97
-
## `read_excel_workbook()`
98
-
99
-
`read_excel_workbook()` reads all the data from the sheets of an Excel workbook and return an appended dataframe.
`read_csv_files_from_dir()` reads all csv files from the `"~/data"` directory and returns an appended dataframe. The resulting dataframe will be in the same order as the CSV files in the directory.
The `read_gsheets()` function imports data from multiple sheets in a Google Sheets spreadsheet and appends the resulting dataframes from each sheet together to create a single dataframe. This function is a powerful tool for data analysis, as it allows you to easily combine data from multiple sheets into a single dataset.
`read_spss_data()` is designed to seamlessly import data from an SPSS data (`.sav` or `.zsav`) files. It converts labelled variables into factors, a crucial step that enhances the ease of data manipulation and analysis within the R programming environment.
166
-
167
-
```{r spssdata1}
168
-
169
-
# Read an SPSS data file without converting variable labels as column names
**Read the Stata data file and convert variable labels as column names**
206
-
207
-
```{r statadata2}
208
-
209
-
data <- read_stata_data(file = file_path, label = TRUE)
210
-
211
-
data
212
-
213
-
```
214
-
215
-
216
-
## `generate_dictionary()`
217
-
218
-
`generate_dictionary()` creates a data dictionary from a specified data frame. This function is particularly useful for understanding and documenting the structure of your dataset, similar to data dictionaries in Stata or SPSS.
The `look_for()` function is designed to emulate the functionality of the Stata `lookfor` command in R. It provides a powerful tool for searching through large datasets, specifically targeting variable names, variable label descriptions, factor levels, and value labels. This function is handy for users working with extensive and complex datasets, enabling them to quickly and efficiently locate the variables of interest.
235
-
236
-
237
-
```{r}
238
-
239
-
# Look for a single keyword.
240
-
241
-
look_for(wage_data, "south")
242
-
```
243
-
244
-
245
-
## `pull_out()`
246
-
247
-
`pull_out()` is similar to `[`. It acts on vectors, matrices, arrays and lists to extract or replace parts. It is pleasant to use with the magrittr (`%>%`) and base(`|>`) operators.
`convert_to_date()` parses an input vector into POSIXct date-time object. It is also powerful to convert from excel date number like `42370` into date value like `2016-01-01`.
`inspect_na()` summarizes the rate of missingness in each column of a data frame. For a grouped data frame, the rate of missingness is summarized separately for each group.
311
-
312
-
```{r example 6a}
313
-
314
-
# dataframe summary
315
-
316
-
inspect_na(airquality)
317
-
318
-
# grouped dataframe summary
319
-
320
-
airquality %>%
321
-
group_by(Month) %>%
322
-
inspect_na()
323
-
324
-
```
325
-
326
-
## `fill_missing_values()`
327
-
328
-
`fill_missing_values()` in an efficient function that addresses missing values in a dataframe. It uses imputation by function, meaning it replaces missing data in numeric variables with either the mean or the median, and in non-numeric variables with the mode. The function takes a column-based imputation approach, ensuring that replacement values are derived from the respective columns, resulting in accurate and consistent data. This method enhances the integrity of the dataset and promotes sound decision-making and analysis in data processing workflows.
0 commit comments