This week's module focuses on the various aspects of R package creation, with an assignment to create our very own R package! I am thankful that the video provides a good walkthrough, as well as the supporting resources offered for the week. Following are my experiences, good and bad!
The first step in the process was to actually create a project and new package in the R Studio interface. Then, install two packages, "devtools" and "roxygen2". These packages include developer tools that are a big help to have available when creating R packages. A number of different files and folders were created for functions, help, description, etc.
After the appropriate development-related packages were installed, I got to work creating my function. Since I work as an ECommerce Marketing Specialist as part of my job as ECommerce & Marketing Manager, I thought it would be a good idea to create a package that could perform a variety of different functions for determining stats like click-through rate, conversion rate, cost per conversion and more. Although I created the package "mod12sem", I did only create one function called "ctr" which is meant to calculate the click-through rate, which is clicks divided by impressions. Following is the function:
ctr <- function(impressions, clicks) {
clicks / impressions
}
Unfortunately, this is where I began to run into problems. I created my package, created my function, and built and reloaded it. When I attempted to install it "install.packages("mod12sem") returned an error message that stated "package ‘mod12sem’ is not available (for R version 3.2.3)". I spent a great deal of time researching this issue but I was unable to find a solution for it. Nonetheless, I have posted the package to Github. Perhaps someone can tell me what I am doing wrong!
I was also not able to successfuly integrate Github with R Studio because some of the steps in the powerpoint were not available in my version of R Studio. I believe I was able to push all the way to the powerpoint slides that discussed the cmd prompt, etc. but ultimately failed when attempting git push -uu origin master because I was being told that nschubert@mail.usf.edu.mod12 is not a valid repository name. I know that, and my repository name should be https://github.com/kalovast/Mod12 . Unfortunately I cannot seem to change the portion that shows my email address. I was ultimately unsuccessful at getting it onto Github.