Posts

Module # 3 data.frame

Image
  Module # 3   Right now, you can’t really summarize the poll results because R never actually created the dataset, the code has syntax errors that stop it from running. Before we can make any sense of the results, we need to fix the code just enough so R can read the candidate names and the poll percentages. Once the dataset exists in R, we can start comparing the ABC and CBS results, see which candidates are leading, and notice any differences between the polls. Rewritten to compare result:  After running the corrected code, we can see the poll results for each candidate side by side. Donald is clearly the frontrunner in both ABC and CBS polls, while Ted also has strong support but with some differences between the two sources. Candidates like Marco, Hillary, and Bernie have moderate numbers, and Carly and Jeb are at the bottom. Even though the polls aren’t exactly the same, they tell a pretty similar story about who’s more popular.

Module # 2 Assignment

Image
 Module # 2 Assignment The function didn’t work because the variable names inside it were wrong. The function takes assignment2 as an input, but it was trying to use assignment and someData, which don’t exist. R can’t find those, so it gives an error. Basically, a function only knows about the variables you give it or make inside it, it doesn’t automatically know about anything else. This is the corrected version, which displays the mean.

Assignment #1

Image
  Github Installing R and RStudio   I installed R by downloading it from the CRAN website and selecting the version that matched my operating system. After R finished installing, I downloaded RStudio Desktop from the Posit website and completed the setup process. Overall, the installation was straightforward and did not require any advanced technical steps. I did not encounter any major issues during the installation. When I opened RStudio, it automatically detected the R installation, which made the setup seamless. If any issues had come up, common fixes would have included reinstalling R first, making sure both R and RStudio were up to date, or restarting the system, but none of these steps were necessary in my case. System Details: • Operating System: Windows 11 • R Version: R 4.5.1 • RStudio Version: 2025.05.1+513 Below is a screenshot of the RStudio console window showing a successful installation.     Understanding R Vectors (Readings Summary) ...