Discover and read the best of Twitter Threads about #rthread

Most recents (1)

Here's a basic tutorial for how to do simple linear regression in R!

(all in one thread?!)

#regression #Rstats #datascience #tutorial #ecology #Rthread #linearmodel #dataanalysis #statistics

[1/15]
First we are going to load some data. Let's use the built-in "trees" dataset by running:

data(trees)

This dataset is based on 31 black cherry trees trunks: their diameter at breast height (DBH) in inches (girth), height in feet, and wood volume in cubic feet.

[2/15]
Let's first rename the columns for clarity:

names(trees) <- c("DBH_in","height_ft", "volume_ft3")

[3/15]
Read 15 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!