Posts

Final project

 Github:  Ejeat12/R-package (github.com) For the final project, IVE created a package titled circle that contains three functions and does not require any dependencies. All three functions each take a given radius as a function and individually calculate the diameter, circumference, and area parameters. Below are the code snippets of how you would use the function. 1. calculate area circle_area <- function ( radius ) { pi * radius ^ 2 } 2. calculate area circle_circumference <- function ( radius ) { 2 * pi * radius } 1. calculate diameter circle_diameter <- function ( radius ) { 2 * radius }

Module # 11 Debugging and defensive programming in R

Image
 For this project, the goal is to identify the error in the top section of code, in the image. The following error arises with the last section of code { outlier.vec[i] <- all(outliers[i,]) } return(outlier.vec) }. In this case the use of parentheses is wrong. The right use is below.

Module #10

Image
  Above is my following description file I've created in RStudio. The following categories are explained below. Package . The name of the package. Title . A one-line description of what the package does. Version . Convention has it that this should be in the format   <major>.<minor>.<patch> . Since we are only in development we start a fourth digit, which, also by convention, starts with   9000 . Hence   0.0.0.9000   is a good starting point, and   0.0.0.9001   would be the next (development) version while   0.1.0   or   1.0.0   would be the first release version. Authors@R . Machine-readable description of the authors ( aut ), maintainer ( cre ), contributors ( ctb ) and others (see   ?person ). Description . One paragraph of what the packages does.  Depends . Lists the dependencies that are absolutely necessary to load the package. License . Who can use this package and for what? I suggest  CC0 Bel...

Module # 9 Visualization in R

Image
The goal of this assignment is to generate three simple histograms of the Bank Wages dataset, using the job column. Below are the three libraries and their following outputs that I will illustrate. 1. Pre-built R library: This is the base hist plot for R. It is simply to implement and follow along, though it does not come with any  customizations. 2.   Lattice hist plot:  This is the hist plot for lattice in R. It is my personal favorite out of al l three plots because it is pre-built to be colorful and outstanding. It also allows for customizations of the x and y labels, as well as a title. 3.   GGPLOT   hist plot:  I would say this is the standard library for visualizations plots since it comes with numerous of customizations such as controlling the Bin width for the histograms.

Module # 8 Input/Output, string manipulation and plyr package

#Step 1 col_names= c( 'Name' , 'Age' , 'Sex' , 'Grade' ) Student_assignment6 <- read.table( 'Assignment 6 Dataset.txt' , sep= ',' , header= TRUE , col.names = col_names) Student_assignment6 ## Name Age Sex Grade ## 1 Booker 18 Male 83 ## 2 Lauri 21 Female 90 ## 3 Leonie 21 Female 91 ## 4 Sherlyn 22 Female 85 ## 5 Mikaela 20 Female 69 ## 6 Raphael 23 Male 91 ## 7 Aiko 24 Female 97 ## 8 Tiffaney 21 Female 78 ## 9 Corina 23 Female 81 ## 10 Petronila 23 Female 98 ## 11 Alecia 20 Female 87 ## 12 Shemika 23 Female 97 ## 13 Fallon 22 Female 90 ## 14 Deloris 21 Female 67 ## 15 Randee 23 Female 91 ## 16 Eboni 20 Female 84 ## 17 Delfina 19 Female 93 ## 18 Ernestina 19 Female 93 ## 19 Milo 19 Male 67 #Step 2 install.packages( "plyr" ) ## Installing package into '/cloud/lib/x86_64-pc...

Module # 7 R Object: S3 vs. S4 assignment

  In your blog, discuss the following questions: How do you tell what OO system (S3 vs. S4) an object is associated with? In r, you can use the isS4 function, which returns true or false. How do you determine the base type (like integer or list) of an object? typeof() function What is a generic function? A function that dispatches methods to objects What are the main differences between S3 and S4? S3 is a less structured, older version.

Module # 6 Doing math in R part 2

Image