Posts

Final Project

Image
  The R Package that I have implemented is titled "Video Game Sales". The dataset was originally from  Kaggle . This package analyzes data from more than 16,500 games. We can see information such as platform of the game, year of release, genre, publisher, and sales from different genres. The goal of this package is to locate trends over time and the relationship between regions and sales.  I focused on building 4 functions.  sales.over.time:  This function focused on aggregated video game sales by Year for a selected region. The regions include: Global, North America, Europe, Japan, and Other. With this function, the output results in a printed data frame of yearly sales as well as a line plot that demonstrates trends over time. I also added some extra details in the line plot such as angled x-axis for easier readability.   To test out the function, I would use this input: > sales.over.time(VideoGames, region = "NA") Which would result in this: Y...

Module # 12 R Markdown

Image
  Instructions: Create a new Markdown file using R programming. Focus specifically on the main functions you are developing for your final project. Describe each function in detail within the Markdown file. Explain the purpose, inputs, outputs, and any additional relevant information. Utilize Markdown formatting to present your content in a clear and organized manner. Include code snippets or examples within the Markdown file to illustrate how the functions work. GitHub and Documentation: Post your Markdown file on GitHub. Use the Markdown file as a means to document and showcase your functions for the final project. Consider including any insights, challenges, or improvements you encountered during the development process in the Markdown file. Submission: Submit the link to your GitHub repository containing the Markdown file. Please note that this assignment will not only help you solidify your understanding of R programming but also improve your skills in documenting code using M...

Module # 11 Debugging and defensive programming in R

The code below contains a 'deliberate' bug!   tukey_multiple <- function(x) {    outliers <- array(TRUE,dim=dim(x))    for (j in 1:ncol(x))     {     outliers[,j] <- outliers[,j] && tukey.outlier(x[,j])     } outlier.vec <- vector(length=nrow(x))     for (i in 1:nrow(x))     { outlier.vec[i] <- all(outliers[i,]) } return(outlier.vec) } >  Find the bug and fix it . >> Report on your blog the success or failure in your debugging procedure. After inputting the code into Rstudio, i get the result:  Error: unexpected symbol in: " for (i in 1:nrow(x)) { outlier.vec[i] <- all(outliers[i,]) } return" After careful examination I noticed two issues. First, the structure of the function was not  aligned properly. This had to be modified in order for Rstudio to recognize the function.  Second, there appears to be &&.  &...

Module # 10 Building your own R package

Image
  Write your R package proposal for the  final project  on your blog posting. Plus, discuss your DESCRIPTION File and provide a link to your GitHub Yours The dataset I will be using is Video Game Sales (https://www.kaggle.com/datasets/anandshaw2001/video-game-sales). As mentioned in the description,  his package analyzes data from more than 16,500 games.  With it, we are able to see information such as the platform of the game,  year of release, genre, publisher, and sales from different regions. The  intention is to see trends over time and the relationship between regions and  sales. The description file has information such as Package, the title, version, description, depends, license, encoding, and lazydata. The trickiest section for me was depends. I am not too sure if I incorporated the right amount of information for that part. Overall, creating an R package was simple and exciting.  My github or  https://github.com/AlenjaksAbraha...

Module # 9 Visualization in R

Image
  In this module, we reviewed three types of visualization in R: basic visualization without any package, lettuce and ggplot2. Choose any data set for your visualization from Vincent Arel Bundock dataset list:  https://vincentarelbundock.github.io/Rdatasets/datasets.html Links to an external sit  Using this data, generate three types of visualization on the data set you have chosen. In your blog, discuss and present your three visualizations you will create and express your opinion on these three different types of graphics output. The dataset that I will be using is titled "Tips". This is an example dataset with values such as total_bill, tip, sex, smoker, day, time, and size. Below is a screenshot of the data.  Bar Chart The first graph I will be making is a simple bar chart that shows the total value of tips per day. This way we can see what day provides the most tips. From this chart, we are easily able to see that Saturday is the day with the most tips. Surprisi...