Despite nearly all the other functions leading to differing results between both sets of values, Variance, Interquartile and Standard Deviations actually returned equal values for both.
While getting the mean in general is something I'm well acquainted when using R, the method needed in this circumstance was quite new. Having never used the plyr library before, it took a bit of time to figure it out and get the desired result: Making the data subset was also new, as well as interesting. While I knew adding columns to an existing data frame was a common thing one could do, the way it was recommended to be done here was both unique and enlightening. GitHub code: https://github.com/Retrolovania/R_Programming/blob/main/Messing%20with%20CSV.R
For this final project, I remembered the concept of used game prices tending to increase over time, especially older ones (more than 15 years old or so). With the lack on any decent visually-based references to measure the change in time these prices have had, I took it upon myself to make my own. Since no database I could find contained price listings, I obtained my own using PriceCharting.com. I selected a few random games released for the Nintendo GameCube, and recorded the price listing for "loose" games (only the disc). I then compiled all of the prices into an Excel CSV and imported it into RStudio. For clarification, the games I chose were (from left to right): Sonic Classics Collection Need For Speed: Most Wanted Shrek: Extra Large SpongeBob Squarepants: Battle For Bikini Bottom Lego Star Wars: The Video Game Super Monkey Ball TimeSplitters 2 Turok: Evolution Geist Batman: Dark Tomorrow Donkey Kong Jungle Beat I then made a ggplot function that would allow me to easi...
Using Yihui Xie's animation package, I opted to try to make a simple animation of a bouncing ball. While I'm more than pleased with the results, I'm still at a loss as to why the ball isn't bouncing as it should (it's meant to flatten somewhat at the bottom). Regardless, it's still fascinating to see an actual animation having been created with only R code. Code: library (animation) # Function to create the animation frames bounce_animation <- function (height = 10 , gravity = 0.1 , nframes = 25 , x = 0.5 , filename = "bounce_animation.gif" ) { # Initialize variables y <- height velocity <- 0 squished <- FALSE # Create and save the animation saveGIF({ for (i in 1 :nframes) { # Update position and velocity y <- y + velocity velocity <- velocity - gravity # Squish effect when ball ...
Comments
Post a Comment