I wrote an article titled “Neural Networks using the R nnet Package” in the November 2016 issue of Visual Studio Magazine. See https://visualstudiomagazine.com/Articles/2016/11/01/Using-the-R-nnet-Package.aspx.
A neural network is a software system that can use data to make predictions. For example, a neural network classifier could predict the voting behavior (Democratic, Republican, Other) of a person based on their age, annual income, and sex.
The R language has been around for a long time and is intended mostly for ad hoc interactive analyses using classical statistics techniques such as the t-test, ANOVA, and chi-square tests. Because R is an open source language, there are hundreds of add-on libraries (called packages in R terminology). One such package is named nnet and it can create neural networks.
In my article I demonstrate how to use the nnet package on the classic Fisher’s Iris Data where the goal is to predict the species (setosa, versicolor, virginica) of an iris flower based on petal length and width and sepal (a leaf-like structure) length and width.
Some of the key commands are:
cat("\nCreating and training a neural network . . \n")
mynn = nnet(Species ~ ., data=irisdf, subset = sampidx,
size=2, decay=1.0e-5, maxit=50)
cm = table(irisdf$Species[-sampidx], predict(mynn,
irisdf[-sampidx, ], type="class"))
cat("\nConfusion matrix for resulting nn model is: \n")
print(cm)
If you’re not familiar with R, the code above probably looks pretty ugly. R is very quirky with regards to syntax and when I switch from using a common C-family language (C, C#, Java, Python, JavaScript, etc.) to R, it always takes me a while.
The R nnet package is good but not great. The main advantage is that, once you’ve gotten over a non-trivial learning curve, nnet is well-integrated with other R functions.

.NET Test Automation Recipes
Software Testing
SciPy Programming Succinctly
Keras Succinctly
R Programming
2026 Visual Studio Live
2025 Summer MLADS Conference
2026 DevIntersection Conference
2025 Machine Learning Week
2025 Ai4 Conference
2026 G2E Conference
2026 iSC West Conference
Interesting article but I think you meant “add-on” libraries 😉
Oops! Thank you for the catch. I hope my original “ass-on” instead of “add-on” wasn’t some sort of Freudian slip.