Only tested this on Ubuntu 18.04 1. Follow these instructions https://cran.r-project.org/bin/linux/ubuntu/README.html
sudo nano /etc/apt/sources.list
## add the line below to the file.
## For Ubuntu version 18.04 See the R ubuntu readme
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
deb http://cran.utstat.utoronto.ca/bionic-backports main restricted universe
## Save and exit (ctrl+o then ctrl+x)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
Followed these instructions to install packages https://www.digitalocean.com/community/tutorials/how-to-install-r-packages-using-devtools-on-ubuntu-18-04
sudo apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev
sudo apt-get update
sudo -i R
# From within R
devtools::install_github("fsaer/tirefittingr")
#From command line
sudo install git
#navigate to a folder to clone the package to. I used /home/your_user_name/Documents/R-Projects
mkdir /home/your_user_name/Documents/R-Projects
cd /home/your_user_name/Documents/R-Projects
git clone https://github.com/fsaer/tirefittingr/
cd tirefittingr
sudo R
devtools::load_
Install R and RStudio (See above) Open the program "RStudio", Not "R x64 3.6.3"/etc.
Note: This is to use the package to analyze tires. This is NOT for further developing the package.
copy the following code into the console (Bottom/left window) within RStudio:
install.packages("plotly")
install.packages("plyr")
install.packages("dplyr")
install.packages("magrittr")
install.packages("devtools")
devtools::install_github("fsaer/tirefittingr")
You'll have to clone/download the repo (See the big green button on the github webpage for this package) As a ZIP File, then open RStudio.
In the lower right pane of RStudio, switch to the "Packages" tab. Then select "Install" at the top of that window.
In the pop-up window, for the "Install From" dropdown, select "Package Archive File (.Zip)" Then in the button pick the zip file of this package that you just downloaded.
If you have trouble finding these buttons, you can follow the first two images from this link: https://www.jube.io/r-blog/browsing-and-installing-packages
In RStudio, create a new empty project to work in (File > new project). Create a new directory and New Project. Do not use the tirefittingr github package zip/unzipped folder as your directory.
Once you have a new, empty project, go file > New File > R Script.
View online at https://htmlpreview.github.io/?https://github.com/fsaer/tirefittingr/blob/master/docs/Notebook.nb.html
Download the github repo. https://github.com/fsaer/tirefittingr Navigate to and open fsaer/tirefittingr/docs/notebook.nb.html in a web browser. This will run you through examples.
You probably want to start your scripts with the following code to load some useful packages that we've installed into memory so they can be used.
library(plyr) # if you use functions from any of these packages
library(dplyr)
library(plotly)
library(magrittr)
library(tirefittingr)
library(packagename)
,
or to define your own function, you can load it into memory by running the entire function definition in the console, or putting
it into a script that is run (make sure the definition comes before the function is used). install.packages("plotly")
To load into memory use library(packageName)
.
This code is often placed at the top of your script because it must be run
every time the R process is restarted.
library(devtools)
library(plyr)
library(dplyr)
library(plotly)
library(magrittr)
install.packages("devtools") # Lots of tools
install.packages("lintr") # keeps your code properly formatted
install.packages("roxygen2") # For updating documentation
install.packages("testthat") # For automatic testing
install.packages("knitr") # for making markdown notebooks
sSummaryExportFolder
.#make sure you use forward slashes '/' in filename not '\'
install.packages("C:/Users/path_to_package_project", repos = NULL, type = "source")
library(tirefittingr)
Don't forget to commit properly to github!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.