This package contains the data and R Script of the analysis of a study regarding hepatitis E virus (HEV) prevalence in pigs at slaughter, from 208 pig farms in The Netherlands. The primary aim of the study was to investigate whether farms, of different farm types, cluster based on patterns in batch level HEV infection dynamics, and whether the clustering can be used to determine the relative moment of infection on the farms. The README pdf file explains the study design, the composition of the data, and the way to read the other files. The csv file contains the hepatitis E virus PCR and antibody ELISA results of 1711 batches of 208 pig farms; The R file contains code to retrieve descriptive statistics of the PCR results and ELISA results per farm; per farm type; per month and code to repeat the cluster analysis and mixed-effect logistic regression as performed in the publication 'Repeated cross-sectional sampling of pigs at slaughter indicates varying age of hepatitis E virus infection within and between pig farms' in Veterinary Research.