knitr::opts_chunk$set(echo = TRUE)

Installation

(Here we add the libraries used in this package)

library(ggplot2)
library(tidyverse)
library(readr)
install.packages("pkgdown")

(Now, we install our own R package)

#devtools::install_github("natyac/R_Package_Yacsko")

(Final part- downloading data for our R package)

download.file(url = "https://raw.githubusercontent.com/BiologicalDataAnalysis2019/2021/main/projects/project_one/data/FossilAnts.csv", destfile = "FossilAnts.csv")
Ants<-read_csv("/cloud/project/vignettes/FossilAnts.csv")

(Now we start the actual tutorial)

Working example

(Ex:)

library(projectY)
TypesOfAnts <- AntsIn(Ants, Genus)
# We used this function because we wanted to see how many different genera were represented in the experiment/data frame.
# We expect a list of genera to appear in one column, and a count of every time a genera to be in one column, and a count of every time a genera was listed in the Genus column of our original Ants data frame.
NAbegone <- cleanup("/cloud/project/R/Ants.csv")
view(NAbegone)
# This function was used to regenerate the original Ants free of NA and empty data values.
# This function should have outputted a new data frame free of NA-like values.
AntGraph <- AntHistory(Ants, min_ma)
AntGraph
# We wanted a graph to show us the era based on the minimum age when each ant was alive and what era had the most ants living in it.
# The expected output is a histogram that groups each ant by minimum age with a count of each ant/era. 

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(TypesOfAnts)

Including Plots

You can also embed plots, for example:

plot(AntGraph)

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.



natyac/R_package_Yacsko documentation built on Dec. 22, 2021, 12:02 a.m.