This semester, my Data Mining and Machine Learning course introduced me to the R programming language, which is new territory for me, given my backgroundin front-end design and Python development. So far, most of my coding experience has revolved around building interfaces, visualizations, and small data pipelines.
R changes that.
R has come up more than once in my work with Cooperative Extension, especially in conversations around statistical analysis, modeling, and research workflows. As I continue to move deeper into applied AI and data science for agriculture, learning R feels less like a detour and more like adding a powerful new tool to the toolbox, well-aligned with research, evaluation, and decision-support work.
What follows are some of my early notes and reflections from Week 1, capturing both technical fundamentals and the small conceptual ideas I noted as I ventured into a new programming language.
R Feels Different
One of the first things that stood out to me is how opinionated R is about structure and clarity. Even at the syntax level, R nudges you toward consistency.
For example, R is case sensitive, which immediately reinforces the importance of naming conventions. This might sound trivial, but in a statistical environment where variable names often represent real-world measurements, precision matters.
R also starts indexing vectors at 1 instead of 0. Coming from Python, this required a mental reset, but it also subtly aligns with how people naturally count observations and records.
Even something as simple as accessing data is framed in a structured way. For example, Square brackets [ ] are used to access index locations and R references row first, column second. This is a reminder that R is deeply oriented toward matrices as analytical objects.
R’s operators:
==is the equality operator=and<-are assignment operators s||represents logical OR and&&logical AND
The distinction between equality and assignment feels especially important in a statistical environment where mixing those up could quietly undermine an entire analysis.
- A factor represents the possible values in the data
- The standard deviation is framed as the average distance from the mean
These are statistical concepts embedded into the language itself, reinforcing R’s identity as a tool for understanding patterns rather than just manipulating objects.
Naming Conventions: Where Code Meets Communication
One area where R felt surprisingly aligned with my front-end and documentation background was in naming conventions. R encourages naming practices that emphasize readability and intention.
From my notes:
File Names
- Should be meaningful and descriptive
- Should use PascalCase (every word capitalized)
- Avoid underscores or periods
- Use a capital
.Rextension
Variable Names
- Should be meaningful and descriptive
- Should use camelCase
- Avoid underscores and periods
This echoes something I’ve come to appreciate across disciplines: good naming is a form of communication. Whether you’re designing a user interface, writing an extension bulletin, or building a statistical model, clarity compounds.
Functions as Actions
R encourages you to think of functions as verbs: What is this function actually doing?
- Functions should be meaningful and descriptive
- The first word should be a verb
- They should follow camelCase
A function naming example: calculateRectangleArea(). The function name should communicate purpose. That matters when code becomes part of a larger workflow or shared analytical pipeline.
Week 1 in R has been about fundamentals—syntax, structure, and discipline. But more importantly, it’s been about learning to think in a new way about data.
If Python taught me how to build systems, R is beginning to teach me how to understand patterns.
Just some quick observation for now. More to come as this course unfolds.
