Statistical Data Cleaning with Applications in R by Mark van der Loo & Edwin de Jonge
Author:Mark van der Loo & Edwin de Jonge
Language: eng
Format: epub
ISBN: 9781118897133
Publisher: Wiley
Published: 2018-01-25T00:00:00+00:00
6.5.2 Validating in the Pipeline
The pipe operator (%>%) of the magrittr package (Bache and Wickham, 2014) makes it easy to perform consecutive data manipulations on a dataset. The functions check_that and confront have been designed to conform to the pipe operator. For example, we can do
retailers %>% check_that(turnover >= 0, staff >= 0) %>% summary() ## rule items passes fails nNA error warning expression ## 1 V1 60 56 0 4 FALSE FALSE (turnover - 0) >= -1e-08 ## 2 V2 60 54 0 6 FALSE FALSE (staff - 0) >= -1e-08
For more involved checks, it is more convenient to define a validator object first.
v <- validator(turnover>= 0, staff >= 0) retailers %>% confront(v) %>% summary() ## rule items passes fails nNA error warning expression ## 1 V1 60 56 0 4 FALSE FALSE (turnover - 0) >= -1e-08 ## 2 V2 60 54 0 6 FALSE FALSE (staff - 0) >= -1e-08
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8309)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6792)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6768)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6655)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6439)
Driving Data Quality with Data Contracts by Andrew Jones(6380)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6140)
Learning SQL by Alan Beaulieu(6004)
Weapons of Math Destruction by Cathy O'Neil(5795)
Big Data Analysis with Python by Ivan Marin(5389)
Data Engineering with dbt by Roberto Zagni(4395)
Solidity Programming Essentials by Ritesh Modi(4044)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3901)
Pandas Cookbook by Theodore Petrou(3603)
Blockchain Basics by Daniel Drescher(3305)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2914)
Feature Store for Machine Learning by Jayanth Kumar M J(2819)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2803)
Mastering Python for Finance by Unknown(2748)
