Rrrrrrr… matey!

Futuristic Graphics for decoration only.

This was a fun exercise to learn what to expect from R programming when working with a set of data.

Cyber Privateer… Rrrr!
Generated by DALL-E via Bing Chat by my commission.

Being able to focus on what the different functions mean and what to expect their outputs to look like was extremely helpful to someone like myself who does not have a deep background in statistics or in data science. I have used data from scatter plot graphs (such as the geom_point() function) such as shown in Figure 1, Figure 2, and Figure 3 along with the smoothed means (such as the geom_smooth() function) over the years in various engineering problems in the field and never really wondered where/how those plots were generated. This first primer, Data Visualization Basics on the Posit website (Posit, n.d.), did a great job explaining not only where the graphics came from, but the different ways to manipulate and “massage” that data without having to hold a PhD in statistics.

What’s next? So, speaking of my engineering background, what started jumping at me is the tangential connections my mind started making as I was working through these exercises. R is the perfect software tool for the data analysis bit, which of course is where the heart of the ability for an artificial intelligence (AI) to make decisions comes from. With the ability to then extend R in various ways, Neural Networks (Intelligency Org, 2018) and TensorFlow among them (Miller, 2021), I remembered seeing TensorFlow during the Teachable Machine introduction (Google, 2017), and the Teachable Machine can be used with Arduino (Ojeda, n.d.) and of course Arduino’s can be used with Raspberry Pis (Punder, 2020) and you can run Visual Studio (VS) Code on Raspberry Pi (Visual Studio Code, 2023) which brings us full circle to using R in VS Code (Visual Studio Code, 2022) as shown in Figure 5 and Figure 6 (shown here still in Windows 11). Why VS Code? Because it serves as a common integrated development environment (IDE) for multiple programming languages including R, Python, C, Java, Arduino Sketches, and more. Once this platform, VS Code, is understood it provides a common foundation for pivoting to these other related technologies and programming languages that can support AI development. Furthermore, the low cost of the Arduino (Arduino, 2022) and Raspberry Pi (Raspberry Pi Foundation, 2023) options, can help bring AI hardware and software to not only home-based makers, but also grade school classrooms. What a wonderful time we live in!

Figure 1 – Using ggplot()

Screenshot of https://posit.cloud/learn/primers/1.1

Figure 2 – Using geom_point()

Figure 3 – City (cty) vs Highway (hwy) Mileage

Figure 4 – Baby Name Database Loaded

Screenshot of https://posit.cloud/learn/primers/2.1

Figure 5 – Trying to run R in VS Code, part 1

Figure 6 – Trying to run R in VS Code, part 2 – tidyverse installed

Installing the “TidyVerse” into my VS Studio configuration.

Figure 7 – Using dplyr

Screenshot of https://posit.cloud/learn/primers/2.2

Figure 8 – All those Mitchs through the years…

References

Arduino. (2022). Education Starter Kit. Retrieved from Arduino: https://www.arduino.cc/education/edu-starter-kit

Google. (2017). Teachable Machine. Retrieved from Teachable Machine With Google: https://teachablemachine.withgoogle.com/

Intelligency Org. (2018). AI with R. Retrieved from Intelligency: http://www.intelligency.org/ai_r.php

Miller, S. (2021, June 25). What Is R Used For? Retrieved from codecademy: https://www.codecademy.com/resources/blog/what-is-r-used-for/

Ojeda, D. (n.d.). Using Google’s AI (Teachable Machine) to Control an Arduino. Retrieved from Autodesk Instructable: https://www.instructables.com/Use-Teachable-Machine-to-Control-an-Arduino/

Posit. (n.d.). Data Visualization Basics Primer. Retrieved from posit Cloud: https://posit.cloud/learn/primers/1.1

Punder, L. (2020, May 05). How to Use Raspberry Pi and Arduino Together. Retrieved from Tom’s Hardware: https://www.tomshardware.com/how-to/use-raspberry-pi-with-arduino

Raspberry Pi Foundation. (2023). Teachers & educators. Retrieved from Raspberry Pi Foundation: https://www.raspberrypi.org/teach/

Visual Studio Code. (2022, March 23). R in Visual Studio Code. Retrieved from Visual Studio Code: https://code.visualstudio.com/docs/languages/r

Visual Studio Code. (2023, October 4). Visual Studio Code on Raspberry Pi. Retrieved from Visual Studio Code: https://code.visualstudio.com/docs/setup/raspberry-pi

Comments are closed.