netgwas: An R Package for Network-Based Genome-Wide Association Studies. Graphical models provide powerful tools to model and make the statistical inference regarding complex relationships among variables in multivariate data. They are widely used in statistics and machine learning particularly to analyze biological networks. In this paper, we introduce the R package netgwas which is designed for accomplishing three important, and inter-related, goals in genetics: linkage map construction, reconstructing intra- and inter- chromosomal interactions and exploring high-dimensional genotype-phenotype (and genotypes-phenotypes-environments) network. The netgwas package has the capability of dealing with species of any ploidy level. The package implements the recent improvements in linkage map construction (Behrouzi and Wit, 2017b), and in inferring the conditional independence network for non-Gaussian, discrete, and mixed data (Behrouzi and Wit, 2017a), particularly in genotype-phenotype datasets. The package uses a parallelization strategy on multi-core processors to speed-up computations for large datasets. In addition, it contains several functions for simulation and visualization as well as three multivariate example datasets are taken from the literature and that are used to illustrate the package capabilities. The paper includes a brief overview of the statistical methods which have been implemented in the package. The main body of the paper explains how to use the package. Furthermore, we illustrate the package functionality with real examples.