Git Product home page Git Product logo

nes-ufla's Introduction

Short course on R environment

M.Sc. Marco Antonio Peixoto

  • PhD. candidate in genetics and breeding - UFV
  • Visiting scholar researcher - University of Florida
  • Quantitative genetics/genomics and data analyses

Information

Date: 08/27/2022

Time: 9-12 am (GMT 3)


Introduction

This is a repository created to aid the short course in R programming offered to Núcleo de estudos em Silvicultura - UFLA


Summary

1 Download R and RStudio

2 Introduction to R and RStudio

3 Basic functions and structures in R language

4 Functions and packages

5 Models (AoV)

6 Tukey test

7 Regression models

8 Plotting using ggplot2 package


Content

1 Download R and RStudio

Use the following link to download the R program and install it on your computer. It can be done for Windows, Linux, and MAC systems. After the download and installation of R, you can also download and install RStudio. RStudio is an IDE (integrated development environment). It makes your life easier.

Tip: go to this link (https://www.youtube.com/watch?v=28bKdOtIgSY) they will explain to you everything that you need to download and install both tools

2 Introduction to R and RStudio

  • Integration, IDE, console, R environment, and communities

3 Basic functions and structures in R language

  • mean, variance, median, length, dim, str
  • data structure: matrix, dataframe, list, arrays

Vector

V1 = c(1:15)

V1[1]

Matrix

M1 = matrix(V1, nrow = 5,ncol = 3)

M1[1,3]

Arrays

V2 = c(16:30)
M2 = matrix(V2,ncol=3,nrow=5)

A1 = array(c(M1,M2), dim=c(3,5,2))

Data frame

df1 = data.frame(id=c(rep(c(1,2,3,4,5),2)),
                  Var1=c(rnorm(10,10,1)),
                  Var2=c(runif(10,2,5)),
                  Var3=c(rep(c("a","b"),5)))

str(df1)

List

L1=list()

L1[[1]] = c(1,2,5,6,4,5,4,9)

L1[[2]] = c(54,28,68,45,75,98,74,68,45,45,"u","t","d",3,"x",6)

L1[[3]] = c(rnorm(18, 2,0.7))

str(L1)
  • Import and export/save datasets

4 Functions and packages

  • What is a function?
  • What is a package and how to install and use them

5 Models (AoV)

  • Analyses of variance using the package Agricolae (Mendiburu, 2021)

6 Tukey test

  • Implementation of tukey test

7 Regression model

  • Regression model

y = B0 + B1 + e

8 Plotting using ggplot2 package

  • Installing the package ggplot2
  • Saving the graphs

Sources that you may use

i. Github

ii. Coursera

iii. Youtube

iv. Usefull functions

#Paste
paste()
paste0()

#binds
rbind()
cbind()

v. Usefull packages

tydiverse
ggplot2
dplyr
plyr
stringr

vi. Usefull websites

#Graphics

https://r-graph-gallery.com/index.html

#Packages cheatsheet

https://www.rstudio.com/resources/cheatsheets/

Main Menu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.